vtlib library
Public Member Functions | List of all members
vtLightSource Class Reference
Inheritance diagram for vtLightSource:
Inheritance graph

Public Member Functions

 vtLightSource (int LightNumber)
- 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.

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.

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.