Class SoPointLightDragger
- All Implemented Interfaces:
SafeDisposable
SoPointLightDragger
is a dragger that looks like a point light source, can be translated in three directions, and has a translation
field that always reflects its position in local space. The point light dragger also has a special material part which can be used to make it take on the color of a light source.
Remember: This is not a light source! It just looks like one. If you want to move a light with this dragger, you can either:
- Use an
SoPointLightManip
, which is subclassed fromSoLight
. It creates one of these draggers and uses it as the interface to change the location of its light source (see theSoPointLightManip
reference page). The manipulator also edits the material part of this dragger to match the color of light the manipulator is producing. - Use a field-to-field connection to connect the location of a light source from this dragger's
translation
field.
This dragger contains an SoDragPointDragger
, which you drag through 3-space using an integrated set of linear and planar draggers. (For detailed information on how to use SoDragPointDragger
, see its reference page.) The point light dragger sets the planar translation parts of this dragPoint dragger with a new default that looks like a shining sun emanating rays of light (okay, so use your imagination).
By changing the material part you can change the color of the sun shape, because the default part contains no SoMaterial
nodes. This fact enables the SoPointLightManip
(not the dragger, the manipulator) to color its dragger to match the color of the light it is emanating. Recall that a point light manip is derived from SoLight
and creates a point light dragger to provide an interface and geometrical presence on screen. The manipulator also has a color field; when the light color changes, it changes the material part of its dragger so that they match.
You can change the parts in any instance of this dragger using setPart()
.
The default part geometries are defined as resources for this SoPointLightDragger
class. They are detailed in the Dragger Resources section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file $OIVHOME/data/draggerDefaults/pointLightDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.
See SoDragger
for more information about using and customizing draggers, including code examples, using draggers in an immersive VR environment and using WYSIWYG draggers.
File format/default:
PointLightDragger {
boundingBoxCaching | AUTO |
renderCulling | AUTO |
pickCulling | AUTO |
isActive | false |
translation | 0 0 0 |
callbackList | NULL |
material | <pointLightOverallMaterial resource> |
translator | DragPointDragger { |
} | |
translator.yzTranslator.translator | <pointLightTranslatorPlaneTranslator resource> |
translator.xzTranslator.translator | <pointLightTranslatorPlaneTranslator resource> |
translator.xyTranslator.translator | <pointLightTranslatorPlaneTranslator resource> |
translator.yzTranslator.translatorActive | <pointLightTranslatorPlaneTranslatorActive resource> |
translator.xzTranslator.translatorActive | <pointLightTranslatorPlaneTranslatorActive resource> |
translator.xyTranslator.translatorActive | <pointLightTranslatorPlaneTranslatorActive resource> |
translator.xTranslator.translator | <pointLightTranslatorLineTranslator resource> |
translator.yTranslator.translator | <pointLightTranslatorLineTranslator resource> |
translator.zTranslator.translator | <pointLightTranslatorLineTranslator resource> |
translator.xTranslator.translatorActive | <pointLightTranslatorLineTranslatorActive resource> |
translator.yTranslator.translatorActive | <pointLightTranslatorLineTranslatorActive resource> |
translator.zTranslator.translatorActive | <pointLightTranslatorLineTranslatorActive resource> |
Resource: | pointLightOverallMaterial |
Part: | material |
Appearance: | white. half strength emissive, half strength diffuse |
Description: | sets material for the sun shape when stationary. Resource for the moving sun, pointLightTranslatorPlaneTranslatorActive, contains a yellow material for highlighting. |
Resource: | pointLightTranslatorPlaneTranslator |
Parts: | translator.yzTranslator.translator<BR> translator.xzTranslator.translator<BR> translator.xyTranslator.translator |
Appearance: | sun shape with no material |
Description: | picking these parts initiates dragging by the yz, xz, and xy planar draggers respectively. |
Resource: | pointLightTranslatorPlaneTranslatorActive |
Parts: | translator.yzTranslator.translatorActive<BR> translator.xzTranslator.translatorActive<BR> translator.xyTranslator.translatorActive |
Appearance: | yellow sun shape |
Description: | shown during planar dragging in the yz, xz, and xy planes respectively. |
Resource: | pointLightTranslatorLineTranslator |
Parts: | translator.xTranslator.translator<BR> translator.yTranslator.translator<BR> translator.zTranslator.translator |
Appearance: | white cylinder |
Description: | picking these parts initiates dragging in the x, y, and z linear draggers respectively. |
Resource: | pointLightTranslatorLineTranslatorActive |
Parts: | translator.xTranslator.translatorActive<BR> translator.yTranslator.translatorActive<BR> translator.zTranslator.translatorActive |
Appearance: | yellow cylinder |
Description: | shown during linear dragging in the x, y, and z directions respectively. |
All Parts
Part Name | Part Type | Default Type | NULL Default |
callbackList | NodeKitListPart | yes | |
material | Material | yes | |
translator | DragPointDragger | yes |
Extra Information for List Parts from Above Table
Part Name | Container Type | Possible Types |
callbackList | Separator | Callback, EventCallback |
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.draggers.SoDragger
SoDragger.TrackerDirectModes
Nested classes/interfaces inherited from class com.openinventor.inventor.nodekits.SoInteractionKit
SoInteractionKit.Cachings
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsFields inherited from class com.openinventor.inventor.draggers.SoDragger
enableCallbacks, isActive
Fields inherited from class com.openinventor.inventor.nodekits.SoInteractionKit
boundingBoxCaching, pickCulling, renderCaching, renderCulling
Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoring
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SoNodekitCatalog
Returns theSoNodekitCatalog
for this class.Methods inherited from class com.openinventor.inventor.draggers.SoDragger
addFinishCallback, addMotionCallback, addStartCallback, addValueChangedCallback, enableValueChangedCallbacks, getInitialTrackerDirectMode, getMinGesture, getMinGestureFloat, getMinScale, getMotionMatrix, getTrackerDirectMode, removeFinishCallback, removeMotionCallback, removeStartCallback, removeValueChangedCallback, setInitialTrackerDirectMode, setInitialTrackerDirectMode, setMinGesture, setMinGesture, setMinScale, setMotionMatrix, setTrackerDirectMode, setTrackerDirectMode
Methods inherited from class com.openinventor.inventor.nodekits.SoInteractionKit
setPartAsPath
Methods inherited from class com.openinventor.inventor.nodekits.SoBaseKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildren
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
translation
Position of the dragger.
-
-
Constructor Details
-
SoPointLightDragger
public SoPointLightDragger()Constructor.
-
-
Method Details
-
getClassNodekitCatalog
Returns theSoNodekitCatalog
for this class.
-