SoDirectionalLightDragger(3IV)
SoDirectionalLightDragger (SoDirLtDrag) - directional icon you rotate and translate by dragging with the mouse
Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.22.
NAME SoDirectionalLightDragger (SoDirLtDrag) - directional icon you rotate and translate by dragging with the mouse INHERITS FROM SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoDirectionalLightDragger SYNOPSIS #include <Inventor_c/draggers/SoDirectionalLightDragger.h> typedef SoDirectionalLightDragger SoDirLtDrag Fields from class SoDirectionalLightDragger: SoSFRotation rotation SoSFVec3f translation Fields from class SoDragger: SoSFBool isActive Fields from class SoInteractionKit: SoSFEnum renderCaching SoSFEnum boundingBoxCaching SoSFEnum renderCulling SoSFEnum pickCulling Parts from class SoBaseKit: (SoNodeKitListPart) callbackList Functions from class SoDirectionalLightDragger: SoDirectionalLightDragger * SoDirLtDragCreate() const SoNodekitCatalog * SoDirLtDragGetClassNkitCat() SoType SoDirLtDragGetClassTypeId() Functions from class SoDragger: void SoDirLtDragAddStartCB(SoDirLtDrag *this, SoDraggerCB *f, void *userData = NULL) void SoDirLtDragRemoveStartCB(SoDirLtDrag *this, SoDraggerCB *f, void *userData = NULL) void SoDirLtDragAddMotionCB(SoDirLtDrag *this, SoDraggerCB *f, void *userData = NULL) void SoDirLtDragRemoveMotionCB(SoDirLtDrag *this, SoDraggerCB *f, void *userData = NULL) void SoDirLtDragAddFinishCB(SoDirLtDrag *this, SoDraggerCB *f, void *userData = NULL) void SoDirLtDragRemoveFinishCB(SoDirLtDrag *this, SoDraggerCB *f, void *userData = NULL) void SoDirLtDragAddValueChangedCB(SoDirLtDrag *this, SoDraggerCB *f, void *userData = NULL) void SoDirLtDragRemoveValueChangedCB(SoDirLtDrag *this, SoDraggerCB *f, void *userData = NULL) SbBool SoDirLtDragEnableValueChangedCBs(SoDirLtDrag *this) void SoDirLtDragSetMinGesture(SoDirLtDrag *this, int pixels) int SoDirLtDragGetMinGesture(const SoDirLtDrag *this) void SoDirLtDragSetMinScale(float newMinScale) float SoDirLtDragGetMinScale() Functions from class SoInteractionKit: SbBool SoDirLtDragSetPartAsPath(SoDirLtDrag *this, const char *partName, SoPath *surrogatePath ) Functions from class SoBaseKit: const SoNodekitCatalog * SoDirLtDragGetCat(const SoDirLtDrag *this) SoNode * SoDirLtDragGetPart(SoDirLtDrag *this, const char *partName, SbBool makeIfNeeded) SbString SoDirLtDragGetPartString(SoDirLtDrag *this, const SoBase *part) SoNodeKitPath * SoDirLtDragCreatePathToPart(SoDirLtDrag *this, const char *partName, SbBool makeIfNeeded, const SoPath *pathToExtend = NULL) SbBool SoDirLtDragSetPart(SoDirLtDrag *this, const char *partName, SoNode *newPart) SbBool SoDirLtDragSet(SoDirLtDrag *this, char *partName, char *parameters) SbBool SoDirLtDragSet2(SoDirLtDrag *this, char *nameValuePairs) SbBool SoDirLtDragIsSearchingChildren() void SoDirLtDragSetSearchingChildren(SbBool newVal) Functions from class SoNode: void SoDirLtDragSetOverride(SoDirLtDrag *this, SbBool state) SbBool SoDirLtDragIsOverride(const SoDirLtDrag *this) SoNode * SoDirLtDragCopy(const SoDirLtDrag *this, SbBool copyConnections = FALSE) SbBool SoDirLtDragAffectsState(const SoDirLtDrag *this) SoNode * SoDirLtDragGetByName(const char *name) int SoDirLtDragGetByNameList(const char *name, SoNodeList *list) Functions from class SoFieldContainer: void SoDirLtDragSetToDflts(SoDirLtDrag *this) SbBool SoDirLtDragHasDfltVals(const SoDirLtDrag *this) SbBool SoDirLtDragFldsAreEq(const SoDirLtDrag *this, const SoFieldContainer *fc) void SoDirLtDragCopyFieldVals(SoDirLtDrag *this, const SoFieldContainer *fc, SbBool copyConnections = FALSE) void SoDirLtDragGet(SoDirLtDrag *this, SbString *fieldDataString) int SoDirLtDragGetFields(const SoDirLtDrag *this, SoFieldList *resultList) SoField * SoDirLtDragGetField(const SoDirLtDrag *this, const char *fieldName) SbBool SoDirLtDragGetFieldName(const SoDirLtDrag *this, const SoField *field, SbName *fieldName) SbBool SoDirLtDragIsNotifyEnabled(const SoDirLtDrag *this) SbBool SoDirLtDragEnableNotify(SoDirLtDrag *this, SbBool flag) Functions from class SoBase: void SoDirLtDragRef(SoDirLtDrag *this) void SoDirLtDragUnref(const SoDirLtDrag *this) void SoDirLtDragUnrefNoDelete(const SoDirLtDrag *this) void SoDirLtDragTouch(SoDirLtDrag *this) SoType SoDirLtDragGetTypeId(const SoDirLtDrag *this) SbBool SoDirLtDragIsOfType(const SoDirLtDrag *this, SoType type) void SoDirLtDragSetName(SoDirLtDrag *this, const char *name) SbName SoDirLtDragGetName(const SoDirLtDrag *this) DESCRIPTION SoDirectionalLightDragger is a composite dragger. It looks like a sun with a large arrow coming out of it. The arrow can be rotated about the sun by dragging with the mouse; its orientation is given by the rotation field. You can also drag the sun (and the arrow with it) through 3-space. The location is stored in the translation field. The dragger uses an SoRotateSphericalDragger for changing the rotation. Instead of using the default spherical geometry, this dragger uses an arrow shape. The sun is an SoDragPointDragger. Dragging it edits the translation field; conversely, if you change the translation field the sun will move to that new location, bringing the arrow with it. The sun looks and behaves just like the sun in an SoPointLightDragger, as does the material part. See the SoPointLightDragger man page for details. 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: [a] Use an SoDirectionalLightManip, which is subclassed from SoLight. It creates an SoDirectionalLightDragger and uses it as the interface to change the direction of its light source (see the SoDirectionalLightManip man page). The manipulator also edits the material part of this dragger to match the color of light the manipulator is producing. However, the directional light manipulator will ignore the translation field, because a directional light has no location or translation field. So in this case the translation dragger merely allows you to move the physical arrow to wherever you'd like it to be. [b] Put an SoTransform under an SoTransformSeparator. Add the SoDirectionalLight as the next child. Use a field-to-field connection between the rotation fields of this dragger and the transform node to synchronize the light with this dragger. [c] Use engines to connect the rotation field of this dragger to the direction field of an SoDirectionalLight. Use the rotation as input to an SoComposeMatrix engine. Then, use an SoTransformVec3f engine to apply that matrix to (0,0,-1), the default light direction. You can change the parts in any instance of this dragger using SoDraggerSetPart(). The default part geometries are defined as resources for this SoDirectionalLightDragger 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 /usr/share/data/draggerDefaults/directionalLightDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory. FIELDS SoSFRotation rotation Orientation of the rotating part (an arrow by default). SoSFVec3f translation Position of the origin of the directional light dragger. FUNCTIONS SoDirectionalLightDragger * SoDirLtDragCreate() Constructor. const SoNodekitCatalog * SoDirLtDragGetClassNkitCat() Returns an SoNodekitCatalog for this class SoType SoDirLtDragGetClassTypeId() Returns type identifier for this class. CATALOG PARTS ____________________________________________________________________ All parts NULL by Part Name Part Type Default Type Default callbackList NodeKitListPart -- yes material Material -- yes translatorRotInv Rotation -- yes translator DragPointDragger -- yes rotator RotateSphericalDragger -- yes ____________________________________________________________________ | | ________________________________________________________________ Extra information for list parts from above table Part Name Container Type Permissible Types Callback, EventCallback callbackList Separator ________________________________________________________________ | | DRAGGER RESOURCES Resource: directionalLightRotatorRotator Part: rotator.rotator Appearance: white arrow that goes through the sun Description: picking this begins rotation of the arrow about the sun-shape Resource: directionalLightRotatorRotatorActive Part: rotator.rotatorActive Appearance: yellow arrow that goes through the sun Description: displayed while the arrow is being rotated Resource: directionalLightRotatorFeedback Part: rotator.feedback Appearance: empty Separator Description: this disables display of the axes that a rotateSpherical dragger uses by default Resource: directionalLightRotatorFeedbackActive Part: rotator.feedbackActive Appearance: empty Separator Description: this disables display of the axes that a rotateSpherical dragger uses by default Resource: directionalLightOverallMaterial Part: material Appearance: white. half strength emissive, half strength diffuse Description: sets material for the sun shape when stationary. Resource for the moving sun, directionalLightTranslatorPlaneTranslatorActive, contains a yellow material for highlighting. Resource: directionalLightTranslatorPlaneTranslator Parts: translator.yzTranslator.translator translator.xzTranslator.translator 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: directionalLightTranslatorPlaneTranslatorActive Parts: translator.yzTranslator.translatorActive translator.xzTranslator.translatorActive translator.xyTranslator.translatorActive Appearance: yellow sun shape Description: shown during planar dragging in the yz, xz, and xy planes respectively. Resource: directionalLightTranslatorLineTranslator Parts: translator.xTranslator.translator translator.yTranslator.translator translator.zTranslator.translator Appearance: white cylinder Description: picking these parts initiates dragging in the x, y, and z linear draggers respectively. Resource: directionalLightTranslatorLineTranslatorActive Parts: translator.xTranslator.translatorActive translator.yTranslator.translatorActive translator.zTranslator.translatorActive Appearance: yellow cylinder Description: shown during linear dragging in the x, y, and z directions respectively. FILE FORMAT/DEFAULTS DirectionalLightDragger { renderCaching AUTO boundingBoxCaching AUTO renderCulling AUTO pickCulling AUTO isActive FALSE translation 0 0 0 rotation 0 0 1 0 callbackList NULL material <directionalLightOverallMaterial resource> translatorRotInv NULL translator DragPointDragger { } rotator RotateSphericalDragger { } rotator.rotator <directionalLightRotatorRotator resource> rotator.rotatorActive <directionalLightRotatorRotatorActive resource> rotator.feedback <directionalLightRotatorFeedback resource> rotator.feedbackActive <directionalLightRotatorFeedbackActive resource> translator.yzTranslator.translator <directionalLightTranslatorPlaneTranslator resource> translator.xzTranslator.translator <directionalLightTranslatorPlaneTranslator resource> translator.xyTranslator.translator <directionalLightTranslatorPlaneTranslator resource> translator.yzTranslator.translatorActive <directionalLightTranslatorPlaneTranslatorActive resource> translator.xzTranslator.translatorActive <directionalLightTranslatorPlaneTranslatorActive resource> translator.xyTranslator.translatorActive <directionalLightTranslatorPlaneTranslatorActive resource> translator.xTranslator.translator <directionalLightTranslatorLineTranslator resource> translator.yTranslator.translator <directionalLightTranslatorLineTranslator resource> translator.zTranslator.translator <directionalLightTranslatorLineTranslator resource> translator.xTranslator.translatorActive <directionalLightTranslatorLineTranslatorActive resource> translator.yTranslator.translatorActive <directionalLightTranslatorLineTranslatorActive resource> translator.zTranslator.translatorActive <directionalLightTranslatorLineTranslatorActive resource> } SEE ALSO SoInteractionKit, SoDragger, SoCenterballDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger