
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 | |
| HBaseView * | m_pView |
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 | ( | HBaseView * | view | ) |
Constructs an HLightsObject object.
| view | A pointer to the HBaseView object. |
|
virtual |
Implements HObject.
|
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.
| view | A pointer to the HBaseView object. |
| pos | A 3d world position to insert light into. |
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.
| view | A pointer to the HBaseView object. |
| pos | A 3d world position to insert light into. |
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.
| view | A pointer to the HBaseView object. |
| pos | A 3d world position to insert light into. |
This method creates geometry handles on the lights object.
| 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. |
|
staticprotected |
This is a helper function the InsertLocalLight, InsertDistantLight and InsertSpotLight methods. It sets up the object segment.
| 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. |
|
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.
| 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 |
This method activates/deactivates the light geometry.
| view | A pointer to the HBaseView object. |
| onoff | Pass true to activate light geometry or false to deactivate it. |