Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
vtLightSource Class Reference

#include <NodeOSG.h>

Inheritance diagram for vtLightSource:
NodeExtension

Public Member Functions

 vtLightSource (int LightNumber)
 
void SetDiffuse (const RGBf &color)
 
RGBf GetDiffuse () const
 
void SetAmbient (const RGBf &color)
 
RGBf GetAmbient () const
 
void SetSpecular (const RGBf &color)
 
RGBf GetSpecular () const
 
- Public Member Functions inherited from NodeExtension
void SetEnabled (bool bOn)
 
bool GetEnabled () const
 
void SetCastShadow (bool b)
 Set this node to cast a shadow, if it is under a vtShadow node. Default is false.
 
bool GetCastShadow ()
 Get whether this node casts a shadow.
 
void GetBoundSphere (FSphere &sphere, bool bGlobal=false)
 Get the Bounding Sphere of the node.
 
void SetOsgNode (osg::Node *n)
 

Additional Inherited Members

- Public Attributes inherited from NodeExtension
osg::Node * m_pNode
 
bool m_bCastShadow
 

Detailed Description

A Light node is placed into the scene graph to illuminate all lit geometry (geometry that has lighting enabled and has vertex normals).

If you want a light, you should create a vtLightSource node and add it to your scene graph. To move or orient the lightsource, make it a child of a vtTransform node. The light will illuminate the entire scene.

Constructor & Destructor Documentation

vtLightSource::vtLightSource ( int  LightNumber)

Makes a lightsource, which is placed in the scenegraph in order to position the light.

Parameters
LightNumberEach light should use a different light number which should be one of the valid light numbers for the current OpenGL implementation. Only light numbers up to 7 are guaranteed by default. The convention, higher up in vtlib, is to use light number 0 for the sun.

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