SODIRECTIONALLIGHTDRAGGER(3iv)
SoDirectionalLightDragger πβ¨
ok so bestie, this is SoDirectionalLightDragger(3IV) β yes that's the manual name, yes we're putting it right up top, you're welcome π. It's a directional icon you rotate and translate by dragging with the mouse. Iconic behaviour, fr fr.
πΈ NAME πΈ
SoDirectionalLightDragger β a directional icon you rotate and translate by dragging with the mouse π
π¦ INHERITS FROM π¦
lowkey a whole family tree, and it goes like this:
SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit >
SoDragger > SoDirectionalLightDragger
β¨ SYNOPSIS β¨
first things first, you gotta include the header:
#include <Inventor/draggers/SoDirectionalLightDragger.h>
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
Methods from class SoDirectionalLightDragger
SoDirectionalLightDragger()
static const SoNodekitCatalog *
getClassNodekitCatalog() const
static SoType getClassTypeId()
Methods from class SoDragger
void addStartCallback(SoDraggerCB *f, void *userData =
NULL)
void removeStartCallback(SoDraggerCB *f, void *userData =
NULL)
void addMotionCallback(SoDraggerCB *f, void *userData =
NULL)
void removeMotionCallback(SoDraggerCB *f, void *userData =
NULL)
void addFinishCallback(SoDraggerCB *f, void *userData =
NULL)
void removeFinishCallback(SoDraggerCB *f, void *userData =
NULL)
void addValueChangedCallback(SoDraggerCB *f, void *userData
= NULL)
void removeValueChangedCallback(SoDraggerCB *f, void
*userData = NULL)
SbBool enableValueChangedCallbacks()
void setMinGesture(int pixels)
int getMinGesture() const
static void setMinScale(float newMinScale)
static float getMinScale()
Methods from class SoInteractionKit
virtual SbBool setPartAsPath(const SbName &partName, SoPath
*surrogatePath )
Methods from class SoBaseKit
virtual const SoNodekitCatalog *
getNodekitCatalog() const
virtual SoNode * getPart(const SbName &partName, SbBool
makeIfNeeded)
SbString getPartString(const SoBase *part)
virtual SoNodeKitPath * createPathToPart(const SbName &partName, SbBool
makeIfNeeded, const SoPath *pathToExtend =
NULL)
virtual SbBool setPart(const SbName &partName, SoNode *newPart)
SbBool set(char *partName, char *parameters)
SbBool set(char *nameValuePairs)
static SbBool isSearchingChildren()
static void setSearchingChildren(SbBool newVal)
Methods from class SoNode
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
Methods from class SoFieldContainer
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
Methods from class SoBase
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SoType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
Macros from class SoBaseKit
SO_GET_PART(kit, partName, partClass)
SO_CHECK_PART(kit, partName, partClass)
π DESCRIPTION π
ok bestie gather round, because this one is genuinely cute. SoDirectionalLightDragger is a composite dragger. It looks like a sun with a big ol' arrow coming out of it πβ‘οΈ. You can rotate that arrow around the sun by dragging it with the mouse, and where it's pointing is stored in the rotation field. You can also drag the sun (and yeah, the arrow comes along, they're a package deal π«) through 3-space. That location lives in the translation field.
The dragger uses an SoRotateSphericalDragger to handle the rotation. But instead of using the default spherical geometry, this dragger uses an arrow shape. slay.
The sun is an SoDragPointDragger. Dragging it edits the translation field, and it goes both ways β if you change the translation field, the sun moves to that new location and brings the arrow with it. The sun looks and behaves exactly like the sun in an SoPointLightDragger, and so does the material part. So if you want the deets, go read the SoPointLightDragger man page.
REMEMBER, bestie: This is not a light source! It just looks like one. no cap. If you actually want to move a light with this dragger, you've got options:
[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 (peep the SoDirectionalLightManip man page for that). The manipulator also edits the material part of this dragger so it matches the color of light the manipulator is producing. But heads up β 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 is really just letting you move the physical arrow wherever you want it to be. it's giving "decorative". π
[b] Put an SoTransform under an SoTransformSeparator. Add the SoDirectionalLight as the next child. Then 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 setPart(). The default part geometries are defined as resources for this SoDirectionalLightDragger class. They're detailed in the Dragger Resources section of the online reference page for this class. And if you wanna make your program use different default resources for the parts, you can copy the file /usr/share/data/draggerDefaults/directionalLightDragger.iv into your own directory, edit that file, and then set the environment variable SO_DRAGGER_DIR to be a path to that directory. customisation era β¨
π FIELDS π
SoSFRotation rotationβ Orientation of the rotating part (an arrow by default). πΉSoSFVec3f translationβ Position of the origin of the directional light dragger. π
π METHODS π
SoDirectionalLightDragger()β Constructor. the origin story β¨static const SoNodekitCatalog *getClassNodekitCatalog() constβ Returns anSoNodekitCatalogfor this class.static SoType getClassTypeId()β Returns type identifier for this class. πͺͺ
π CATALOG PARTS π
All parts
every single one, with the "NULL by Default" tea:
callbackListβ Part Type:NodeKitListPartβ Default Type:--β NULL by Default:yesmaterialβ Part Type:Materialβ Default Type:--β NULL by Default:yestranslatorRotInvβ Part Type:Rotationβ Default Type:--β NULL by Default:yestranslatorβ Part Type:DragPointDraggerβ Default Type:--β NULL by Default:yesrotatorβ Part Type:RotateSphericalDraggerβ Default Type:--β NULL by Default:yes
Extra information for list parts from above table
callbackListβ Container Type:Separatorβ Permissible Types:Callback,EventCallback
ok and that's part 1, bestie β more is coming, don't go anywhere π«Ά
β¨ DRAGGER RESOURCES β¨
okay bestie this is the fun part β every resource that lives inside this dragger, what part of the scene graph it hooks onto, what it looks like, and what it actually does. no skips. π«Ά
π 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
rotateSphericaldragger uses by default
π Resource: directionalLightRotatorFeedbackActive
- Part:
rotator.feedbackActive - Appearance: empty Separator
- Description: this disables display of the axes that a
rotateSphericaldragger 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.translatortranslator.xzTranslator.translatortranslator.xyTranslator.translator
- Appearance: sun shape with no material
- Description: picking these parts initiates dragging by the
yz,xz, andxyplanar draggers respectively.
π Resource: directionalLightTranslatorPlaneTranslatorActive
- Parts:
translator.yzTranslator.translatorActivetranslator.xzTranslator.translatorActivetranslator.xyTranslator.translatorActive
- Appearance: yellow sun shape
- Description: shown during planar dragging in the
yz,xz, andxyplanes respectively.
π Resource: directionalLightTranslatorLineTranslator
- Parts:
translator.xTranslator.translatortranslator.yTranslator.translatortranslator.zTranslator.translator
- Appearance: white cylinder
- Description: picking these parts initiates dragging in the
x,y, andzlinear draggers respectively.
π Resource: directionalLightTranslatorLineTranslatorActive
- Parts:
translator.xTranslator.translatorActivetranslator.yTranslator.translatorActivetranslator.zTranslator.translatorActive
- Appearance: yellow cylinder
- Description: shown during linear dragging in the
x,y, andzdirections respectively.
π FILE FORMAT/DEFAULTS π
this is literally the whole default setup, laid out exactly as it comes out of the box. do not touch unless you mean it, ok? π
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 π
go read these next bestie, they're all part of the same little family π§
SoInteractionKitSoDraggerSoCenterballDraggerSoDragPointDraggerSoHandleBoxDraggerSoJackDraggerSoPointLightDraggerSoRotateCylindricalDraggerSoRotateDiscDraggerSoRotateSphericalDraggerSoScale1DraggerSoScale2DraggerSoScale2UniformDraggerSoScaleUniformDraggerSoSpotLightDraggerSoTabBoxDraggerSoTabPlaneDraggerSoTrackballDraggerSoTransformBoxDraggerSoTransformerDraggerSoTranslate1DraggerSoTranslate2Dragger
and that's a wrap on the whole thing, bestie π
this was the <rainbow>3IV</rainbow> build of the SoDirectionalLightDragger page, and yeah we are so done. go forth and drag your directional lights around, you absolute icon ππ
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms