HLightsObject
-
class
HLightsObject The
HLightsObjectclass 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.
Inherits from:
HObject, HObjectManipulationListener
Methods
-
HLightsObject::HLightsObject(HBaseView *view) Constructs an
HLightsObjectobject.Parameters
view: A pointer to theHBaseViewobject.
-
HLightsObject::~HLightsObject()
-
char const *
HLightsObject::GetName() virtual
Returns
The name of the object which is ‘light’.
-
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
HBaseViewobject.key: The key of the current object.
complex: Pass true to create complex handles or false to create simple handles.
Returns
AnHOperatorReturnindicating the status of the event.
-
static char const *
HLightsObject::GetStaticName() static
Returns
The name of the object which is ‘light’.
-
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
HBaseViewobject.pos: A 3d world position to insert light into.
-
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
HBaseViewobject.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
HBaseViewobject.pos: A 3d world position to insert light into.
-
static void
HLightsObject::TurnLightsOnOff(HBaseView *view, bool onoff) static
This method activates/deactivates the light geometry.
Parameters
view: A pointer to the
HBaseViewobject.onoff: Pass true to activate light geometry or false to deactivate it.
-
static void
HLightsObject::SetupLightSegment(HBaseView *view, HPoint &pos, HC_KEY &outerkey, HC_KEY &geometrykey) protected static
This is a helper function the
InsertLocalLight,InsertDistantLightandInsertSpotLightmethods. It sets up the object segment.Parameters
view: A pointer to the
HBaseViewobject.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) protected static
This is a helper function to the
SetupLightSegmentmethod. It create anHLightsObjectand adds it to theHObjectManageras well as setting up default attributes for the segment.Parameters
view: A pointer to the
HBaseViewobject.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.
Variables
-
HBaseView *
HLightsObject::m_pView protected
A pointer to the
HBaseViewObject.