Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# osg::LightModel Class Reference

Inheritance diagram for osg::LightModel:

[legend]
List of all members.

## Public Types
enum | ColorControl { SEPARATE_SPECULAR_COLOR, SINGLE_COLOR }
## Public Member Functions
| LightModel ()
| LightModel (const LightModel &lw, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
| Copy constructor using CopyOp to manage deep vs shallow copy.
| META_StateAttribute (osg, LightModel, LIGHTMODEL)
virtual int | compare (const StateAttribute &sa) const
| Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
void | setAmbientIntensity (const osg::Vec4 &ambient)
const osg::Vec4 & | getAmbientIntensity () const
void | setColorControl (ColorControl cc)
ColorControl | getColorControl () const
void | setLocalViewer (bool localViewer)
bool | getLocalViewer () const
void | setTwoSided (bool twoSided)
bool | getTwoSided () const
virtual void | apply (State &state) const
| apply the OpenGL state attributes.
## Protected Member Functions
virtual | ~LightModel ()
## Protected Attributes
osg::Vec4 | _ambient
ColorControl | _colorControl
bool | _localViewer
bool | _twoSided

## Member Enumeration Documentation

enum osg::LightModel::ColorControl

  | Enumeration values:
  SEPARATE_SPECULAR_COLOR |
  SINGLE_COLOR |

## Constructor & Destructor Documentation

osg::LightModel::LightModel | ( |  | ) |

osg::LightModel::LightModel | ( | const LightModel & | lw,
|  | const CopyOp & | copyop = CopyOp::SHALLOW_COPY
| ) | `[inline]`

| Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::LightModel::~LightModel | ( |  | ) | `[protected, virtual]`

## Member Function Documentation

virtual void osg::LightModel::apply | ( | State & | state | ) | const`[virtual]`

| apply the OpenGL state attributes. The global state for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state. Implements osg::StateAttribute.

virtual int osg::LightModel::compare | ( | const StateAttribute & | sa | ) | const`[inline, virtual]`

| Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. Implements osg::StateAttribute.

const osg::Vec4& osg::LightModel::getAmbientIntensity | ( |  | ) | const`[inline]`

ColorControl osg::LightModel::getColorControl | ( |  | ) | const`[inline]`

bool osg::LightModel::getLocalViewer | ( |  | ) | const`[inline]`

bool osg::LightModel::getTwoSided | ( |  | ) | const`[inline]`

osg::LightModel::META_StateAttribute | ( | osg | ,
|  | LightModel | ,
|  | LIGHTMODEL |
| ) |

void osg::LightModel::setAmbientIntensity | ( | const osg::Vec4 & | ambient | ) | `[inline]`

void osg::LightModel::setColorControl | ( | ColorControl | cc | ) | `[inline]`

void osg::LightModel::setLocalViewer | ( | bool | localViewer | ) | `[inline]`

void osg::LightModel::setTwoSided | ( | bool | twoSided | ) | `[inline]`

## Member Data Documentation

osg::Vec4 osg::LightModel::_ambient`[protected]`

ColorControl osg::LightModel::_colorControl`[protected]`

bool osg::LightModel::_localViewer`[protected]`

bool osg::LightModel::_twoSided`[protected]`

The documentation for this class was generated from the following file:

- LightModel