The HLightsObject class encapsulates interactive light objects.
More...
#include <HObjects.h>
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.
◆ HLightsObject()
HLightsObject::HLightsObject |
( |
HBaseView * |
view | ) |
|
◆ 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
-
view | A pointer to the HBaseView object. |
pos | A 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
-
view | A pointer to the HBaseView object. |
pos | A 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
-
view | A pointer to the HBaseView object. |
pos | A 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
-
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.
◆ 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
-
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. |
◆ 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
-
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. |
◆ TurnLightsOnOff()
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. |
◆ m_pView
The documentation for this class was generated from the following file: