SoDirectionalLightManip Class |
Directional light node with 3D interface for editing direction.
Namespace: OIV.Inventor.Manips
The SoDirectionalLightManip type exposes the following members.
Name | Description | |
---|---|---|
SoDirectionalLightManip | Constructor. |
Name | Description | |
---|---|---|
AffectsState | Returns true if a node has an effect on the state during traversal. | |
Callback | (Overrides SoLightCallback(SoCallbackAction).) | |
Copy | Calls Copy(false). (Inherited from SoNode.) | |
Copy(Boolean) | Creates and returns an exact copy of the node. | |
CopyFieldValues(SoFieldContainer) | Calls CopyFieldValues(fc, false). (Inherited from SoFieldContainer.) | |
CopyFieldValues(SoFieldContainer, Boolean) | Copies the contents of fc's fields into this object's fields. | |
Dispose |
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.) | |
Distribute | (Inherited from SoNode.) | |
DoAction | (Overrides SoLightDoAction(SoAction).) | |
EnableNotify | Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false). | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
FieldsAreEqual | Returns true if this object's fields are exactly equal to fc's fields. | |
Get | Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string. | |
GetAllFields | Returns a list of fields, including the eventIn's and eventOut's. | |
GetAlternateRep | This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type). | |
GetBoundingBox | (Overrides SoNodeGetBoundingBox(SoGetBoundingBoxAction).) | |
GetDragger | Returns the dragger being used by this manipulator. | |
GetEventIn | Returns a the eventIn with the given name. | |
GetEventOut | Returns the eventOut with the given name. | |
GetField | Returns a the field of this object whose name is fieldName. | |
GetFieldName | Returns the name of the given field in the fieldName argument. | |
GetFields | Appends references to all of this object's fields to resultList, and returns the number of fields appended. | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetMatrix | (Overrides SoNodeGetMatrix(SoGetMatrixAction).) | |
GetName | Returns the name of an instance. | |
GetPrimitiveCount | (Inherited from SoNode.) | |
GetRenderEngineMode | Returns the supported Render engine mode. | |
GetRenderUnitID | (Inherited from SoNode.) | |
GetStringName | (Inherited from SoBase.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GLRender | (Overrides SoDirectionalLightGLRender(SoGLRenderAction).) | |
GLRenderBelowPath | (Inherited from SoNode.) | |
GLRenderInPath | (Inherited from SoNode.) | |
GLRenderOffPath | (Inherited from SoNode.) | |
GrabEventsCleanup | (Inherited from SoNode.) | |
GrabEventsSetup | (Inherited from SoNode.) | |
HandleEvent | (Overrides SoNodeHandleEvent(SoHandleEventAction).) | |
HasDefaultValues | Returns true if all of the object's fields have their default values. | |
IsBoundingBoxIgnoring | This method is used by getBoundingBox action traversal to know if the current node must be traversed or not, ie the bounding should be ignored. | |
IsNotifyEnabled | Notification is the process of telling interested objects that this object has changed. | |
IsOverride | Returns the state of the override flag. | |
IsSynchronizable | Gets the ScaleViz synchronizable state of this object. | |
Pick | (Overrides SoNodePick(SoPickAction).) | |
RayPick | (Inherited from SoNode.) | |
ReplaceManip | Replaces the tail of the path, which must be this manipulator, with the given OIV.Inventor.Nodes.SoDirectionalLight node. | |
ReplaceNode | Replaces the tail of the path with this manipulator. | |
Search | (Overrides SoNodeSearch(SoSearchAction).) | |
Set | Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. | |
SetName | (Inherited from SoBase.) | |
SetOverride | Turns the override flag on or off. | |
SetSynchronizable | Sets this to be a ScaleViz synchronizable object. | |
SetToDefaults | Sets all fields in this object to their default values. | |
ToString |
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.) | |
Touch | Marks an instance as modified, simulating a change to it. | |
Write | (Overrides SoNodeWrite(SoWriteAction).) |
Name | Description | |
---|---|---|
color | Light source illumination color. | |
direction | Illumination direction vector. | |
intensity | Illumination intensity of light source. | |
IsDisposable | ISafeDisposable interface implementation.
(Inherited from SoDisposable.) | |
on | Determines whether the source is active or inactive. | |
UserData |
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.) |
OIV.Inventor.Manips.SoDirectionalLightManip is the base class for all OIV.Inventor.Nodes.SoDirectionalLight nodes that have a built-in 3D user interface (this is the only such class provided with the Open Inventor toolkit). Since it is derived from OIV.Inventor.Nodes.SoDirectionalLight, any changes to its fields result in a change of lighting for nodes that follow it in the scene graph. In this case, the interface edits the direction field. Also, the color of the manipulator's geometry will reflect the color of the light (but you cannot edit the color using this manipulator).
Typically, you will want to replace a regular OIV.Inventor.Nodes.SoDirectionalLight with an OIV.Inventor.Manips.SoDirectionalLightManip (as when the user selects a light to be edited), or vice versa (as when the user is done moving the light and the interface should go away). Use the OIV.Inventor.Manips.SoDirectionalLightManip.ReplaceNode(OIV.Inventor.SoPath) method to insert a manipulator into a scene graph, and the OIV.Inventor.Manips.SoDirectionalLightManip.ReplaceManip(OIV.Inventor.SoPath, OIV.Inventor.Nodes.SoDirectionalLight) method to remove it when done.
The OIV.Inventor.Manips.SoDirectionalLightManip utilizes an OIV.Inventor.Draggers.SoDirectionalLightDragger to provide a 3D interface. However, the manipulator differs from the dragger; it lights other objects in the scene because, as an OIV.Inventor.Nodes.SoDirectionalLight, it alters the state. The field values and movement of the dragger, on the other hand, affect only the dragger itself. To find out more about how the interface works and what each part will do, see the reference page for OIV.Inventor.Draggers.SoDirectionalLightDragger. The interfaces of the dragger and the manipulator are identical.
The OIV.Inventor.Manips.SoDirectionalLightManip utilizes its dragger by adding it as a hidden child. When an action is applied to the manipulator, such as rendering or handling events, the manipulator first traverses the dragger, and then the manipulator adds its lighting parameters to the state. When you click-drag-release over the manipulator, it passes these events down to the dragger, which moves as a result ("I can't <B> help </B> it, I'm a dragger!").
The manipulator maintains consistency between the fields of the dragger and its own fields. Let's say you use the mouse to rotate the dragger . Delegates ensure that the direction field of the manipulator will change by the same amount, thus changing the lighting of nodes which follow in the scene graph. Similarly, if you set the direction field of the OIV.Inventor.Manips.SoDirectionalLightManip, the manipulator will orient the dragger accordingly.
Because the dragger is a hidden child, you can see the dragger on screen and interact with it, but the dragger does not show up when you write the manipulator to file. Also, any OIV.Inventor.SoPath will end at the manipulator. (See the Actions section of this reference page for a complete description of when the dragger is traversed).
You can get this dragger from the manipulator using the OIV.Inventor.Manips.SoDirectionalLightManip.GetDragger() method. You will need to do this if you want to change the geometry of a manipulator, since the geometry actually belongs to the dragger.
DirectionalLightManip {
on | true |
intensity | 1 |
color | 1 1 1 |
direction | 0 0 -1 |
OIV.Inventor.Actions.SoGLRenderAction, OIV.Inventor.Actions.SoCallbackAction, OIV.Inventor.Actions.SoGetBoundingBoxAction, OIV.Inventor.Actions.SoGetMatrixAction, OIV.Inventor.Actions.SoHandleEventAction, OIV.Inventor.Actions.SoRayPickAction First, traverses the dragger the way an OIV.Inventor.Nodes.SoGroup would. All draggers place themselves in space, but leave the current transformation unchanged when finished. Then the OIV.Inventor.Manips.SoDirectionalLightManip adds a directional light to the state just like its base class, OIV.Inventor.Nodes.SoDirectionalLight.
OIV.Inventor.Actions.SoSearchAction Searches just like an OIV.Inventor.Nodes.SoDirectionalLight. Does not search the dragger, which is a hidden child.
OIV.Inventor.Actions.SoWriteAction Writes out just like an OIV.Inventor.Nodes.SoDirectionalLight. Does not write the dragger, which is a hidden child. If you really need to write valuable information about the dragger, such as customized geometry, you can retrieve the dragger with the OIV.Inventor.Manips.SoDirectionalLightManip.GetDragger() method and then write it out separately.