Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HLightsObject Class Reference

The HLightsObject class encapsulates interactive light objects. More...

#include <HObjects.h>

Inheritance diagram for HLightsObject:

HObject

List of all members.

Public Member Functions

const char * GetName ()
 HLightsObject (HBaseView *view)
int SetupHandlesEvent (HBaseView *view, HC_KEY key, bool complex)

Static Public Member Functions

static const char * GetStaticName ()
static void InsertDistantLight (HBaseView *view, HPoint &pos)
static void InsertLocalLight (HBaseView *view, HPoint &pos)
static void InsertSpotLight (HBaseView *view, HPoint &pos)
static void TurnLightsOnOff (HBaseView *view, bool onoff)

Static Protected Member Functions

static void SetupLightSegment (HBaseView *view, HPoint &pos, HC_KEY &outerkey, HC_KEY &geometrykey)
static void SetupLightSegmentFromKey (HBaseView *view, HPoint &pos, HC_KEY &outerkey, HC_KEY &geometrykey)

Protected Attributes

HBaseViewm_pView


Detailed Description

The HLightsObject class encapsulates interactive light objects.

This class creates 3d objects representing the various HOOPS light types which can be repositioned and rotate interactively using the handle functionality.


Constructor & Destructor Documentation

HLightsObject::HLightsObject ( HBaseView view  ) 

Constructs an HLightsObject object.

Parameters:
view A pointer to the HBaseView object.


Member Function Documentation

const char* HLightsObject::GetName (  )  [virtual]

Returns:
The name of the object which is 'light'.

Implements HObject.

static const char* HLightsObject::GetStaticName (  )  [static]

Returns:
The name of the object which is 'light'.

static void HLightsObject::InsertDistantLight ( HBaseView view,
HPoint pos 
) [static]

This method inserts a distant light at the given position in the object segment. As described in HC_Insert_Distant_Light, the distant light represents a directional light source that is so far away that the rays of light are parallel when it hits the object. Note that it illuminates all surfaces in a scene with the same intensity. Geometry-wise, the distant light is represented by an arrow in the scene.

Parameters:
view A pointer to the HBaseView object.
pos A 3d world position to insert light into.

static void HLightsObject::InsertLocalLight ( HBaseView view,
HPoint pos 
) [static]

This method insert a local light at the given position in the object segment. The local light is an infinitesimally small point that radiates light in all direction as described in HC_Insert_Local_Light. Geometry-wise, the local light is represented by a sphere in the scene.

Parameters:
view A pointer to the HBaseView object.
pos A 3d world position to insert light into.

static void HLightsObject::InsertSpotLight ( HBaseView view,
HPoint pos 
) [static]

This method inserts a spot light at given position in the object segment. The spot light is the most common general use light used in HOOPS. As described in HC_Insert_Spot_Light, it can not only behave like a sharp-edged spotlight, but also like a variable-focus flashlight, or a fuzzy-edged floodlight. These characteristics are determined from the light's position, target, illumination cone, edge sharpness, and concentration parameters. Geometry-wise, the spot light is represented as an arrow and sphere.

Parameters:
view A pointer to the HBaseView object.
pos A 3d world position to insert light into.

int HLightsObject::SetupHandlesEvent ( HBaseView view,
HC_KEY  key,
bool  complex 
)

This method creates geometry handles on the lights object.

Parameters:
view A pointer to the HBaseView object.
key The key of the current object.
complex Pass true to create complex handles or false to create simple handles.
Returns:
An HOperatorReturn indicating the status of the event.

static void HLightsObject::SetupLightSegment ( HBaseView view,
HPoint pos,
HC_KEY &  outerkey,
HC_KEY &  geometrykey 
) [static, protected]

This is a helper function the InsertLocalLight, InsertDistantLight and InsertSpotLight methods. It sets up the object segment.

Parameters:
view A pointer to the HBaseView object.
pos A 3d world position to insert light into.
outerkey Returns the object key to insert the light into.
geometrykey Returns the key to insert the geometry into.

static void HLightsObject::SetupLightSegmentFromKey ( HBaseView view,
HPoint pos,
HC_KEY &  outerkey,
HC_KEY &  geometrykey 
) [static, protected]

This is a helper function to the SetupLightSegment method. It create an HLightsObject and adds it to the HObjectManager as well as setting up default attributes for the segment.

Parameters:
view A pointer to the HBaseView object.
pos A 3d world position to insert light into.
outerkey The Object key to insert light into.
geometrykey Returns the key to insert the geometry into.

static void HLightsObject::TurnLightsOnOff ( HBaseView view,
bool  onoff 
) [static]

This method activates/deactivates the light geometry.

Parameters:
view A pointer to the HBaseView object.
onoff Pass true to activate light geometry or false to deactivate it.


Member Data Documentation

A pointer to the HBaseView Object.


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