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

#include <HObjects.h>

Public Member Functions

const char * GetName ()
 
 HLightsObject (HBaseView *view)
 
int SetupHandlesEvent (HBaseView *view, HC_KEY key, bool complex)
 
- Public Member Functions inherited from HObject
 HObject ()
 

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::HLightsObject ( HBaseView view)

Constructs an HLightsObject object.

Parameters
viewA pointer to the HBaseView object.

Member Function Documentation

◆ GetName()

const char* HLightsObject::GetName ( )
virtual
Returns
The name of the object which is 'light'.

Implements HObject.

◆ GetStaticName()

static const char* HLightsObject::GetStaticName ( )
static
Returns
The name of the object which is 'light'.

◆ InsertDistantLight()

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
viewA pointer to the HBaseView object.
posA 3d world position to insert light into.

◆ InsertLocalLight()

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
viewA pointer to the HBaseView object.
posA 3d world position to insert light into.

◆ InsertSpotLight()

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
viewA pointer to the HBaseView object.
posA 3d world position to insert light into.

◆ SetupHandlesEvent()

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

This method creates geometry handles on the lights object.

Parameters
viewA pointer to the HBaseView object.
keyThe key of the current object.
complexPass true to create complex handles or false to create simple handles.
Returns
An HOperatorReturn indicating the status of the event.

◆ SetupLightSegment()

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

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

Parameters
viewA pointer to the HBaseView object.
posA 3d world position to insert light into.
outerkeyReturns the object key to insert the light into.
geometrykeyReturns the key to insert the geometry into.

◆ SetupLightSegmentFromKey()

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

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
viewA pointer to the HBaseView object.
posA 3d world position to insert light into.
outerkeyThe Object key to insert light into.
geometrykeyReturns the key to insert the geometry into.

◆ TurnLightsOnOff()

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

This method activates/deactivates the light geometry.

Parameters
viewA pointer to the HBaseView object.
onoffPass true to activate light geometry or false to deactivate it.

Member Data Documentation

◆ m_pView

HBaseView* HLightsObject::m_pView
protected

A pointer to the HBaseView Object.


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