Click or drag to resize
SoSpotLightDragger Class

Spotlight shaped dragger that allows you to change position, direction, and width of the beam.

Inheritance Hierarchy

Namespace: OIV.Inventor.Draggers
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public class SoSpotLightDragger : SoDragger

The SoSpotLightDragger type exposes the following members.

Constructors
  NameDescription
Public methodSoSpotLightDragger

Constructor.

Top
Methods
  NameDescription
Public methodAffectsState

Returns true if a node has an effect on the state during traversal.

(Inherited from SoNode.)
Public methodCallback
(Inherited from SoBaseKit.)
Public methodClearOtherEventCallbacks
(Inherited from SoDragger.)
Public methodCopy
Calls Copy(false).
(Inherited from SoNode.)
Public methodCopy(Boolean)

Creates and returns an exact copy of the node.

(Inherited from SoNode.)
Public methodCopyFieldValues(SoFieldContainer)
Calls CopyFieldValues(fc, false).
(Inherited from SoFieldContainer.)
Public methodCopyFieldValues(SoFieldContainer, Boolean)

Copies the contents of fc's fields into this object's fields.

(Inherited from SoFieldContainer.)
Public methodCreatePathToPart(String, Boolean)
Calls CreatePathToPart(partName, makeIfNeeded, (OIV.Inventor.SoPath ^)nullptr).
(Inherited from SoBaseKit.)
Public methodCreatePathToPart(String, Boolean, SoPath)

Returns a path that begins at this nodekit and ends at partName.

(Inherited from SoBaseKit.)
Public methodCreatePathToThis
(Inherited from SoDragger.)
Public methodDispose
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.)
Public methodDistribute
(Inherited from SoNode.)
Public methodDoAction
(Inherited from SoBaseKit.)
Public methodEnableNotify

Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false).

(Inherited from SoFieldContainer.)
Public methodEnableValueChangedEvent

You can temporarily disable a dragger's valueChangedCallbacks.

(Inherited from SoDragger.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFieldsAreEqual

Returns true if this object's fields are exactly equal to fc's fields.

(Inherited from SoFieldContainer.)
Public methodGet

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

(Inherited from SoFieldContainer.)
Public methodGetAllFields

Returns a list of fields, including the eventIn's and eventOut's.

(Inherited from SoFieldContainer.)
Public methodGetAlternateRep

This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type).

(Inherited from SoNode.)
Public methodGetBoundingBox
(Inherited from SoBaseKit.)
Public methodStatic memberGetClassNodekitCatalog

Returns the OIV.Inventor.Nodekits.SoNodekitCatalog for this class.

Public methodGetEvent
(Inherited from SoDragger.)
Public methodGetEventIn

Returns a the eventIn with the given name.

(Inherited from SoFieldContainer.)
Public methodGetEventOut

Returns the eventOut with the given name.

(Inherited from SoFieldContainer.)
Public methodGetField

Returns a the field of this object whose name is fieldName.

(Inherited from SoFieldContainer.)
Public methodGetFieldName

Returns the name of the given field in the fieldName argument.

(Inherited from SoFieldContainer.)
Public methodGetFields

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

(Inherited from SoFieldContainer.)
Public methodGetHandleEventAction
(Inherited from SoDragger.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetLocalStartingPoint
(Inherited from SoDragger.)
Public methodGetLocalToWorldMatrix
Calls GetLocalToWorldMatrix((OIV.Inventor.Actions.SoAction ^)nullptr).
(Inherited from SoDragger.)
Public methodGetLocalToWorldMatrix(SoAction)
(Inherited from SoDragger.)
Public methodGetMatrix
(Inherited from SoBaseKit.)
Public methodGetMinGesture

Gets the number of pixels of movement required to initiate a constraint gesture.

(Inherited from SoDragger.)
Public methodGetMinGestureFloat (Inherited from SoDragger.)
Public methodGetMotionMatrix

Get the motion matrix.

(Inherited from SoDragger.)
Public methodGetName

Returns the name of an instance.

(Inherited from SoBase.)
Public methodGetNodekitCatalog (Inherited from SoBaseKit.)
Public methodGetPart

Searches the nodekit catalog (and those of all nested nodekits) for the part named partName.

(Inherited from SoBaseKit.)
Public methodGetPartString

Given a node or a path to a node, checks if the part exists in the nodekit, in a nested nodekit, or an element of a list part.

(Inherited from SoBaseKit.)
Public methodGetPartToLocalMatrix
(Inherited from SoDragger.)
Public methodGetPickPath
(Inherited from SoDragger.)
Public methodGetPrimitiveCount
(Inherited from SoBaseKit.)
Public methodGetRenderEngineMode

Returns the supported Render engine mode.

(Inherited from SoNode.)
Public methodGetRenderUnitID
(Inherited from SoNode.)
Public methodGetStartMotionMatrix
(Inherited from SoDragger.)
Public methodGetStringName (Inherited from SoBase.)
Public methodGetSurrogatePartPickedName
(Inherited from SoDragger.)
Public methodGetSurrogatePartPickedOwner
(Inherited from SoDragger.)
Public methodGetSurrogatePartPickedPath
(Inherited from SoDragger.)
Public methodGetTrackerDirectMode

Get the current tracker direct mode for this dragger.

(Inherited from SoDragger.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetViewportIsEnabled (Inherited from SoBaseKit.)
Public methodGetViewportOrigin (Inherited from SoBaseKit.)
Public methodGetViewportRegion Obsolete.
(Inherited from SoDragger.)
Public methodGetViewportSize (Inherited from SoBaseKit.)
Public methodGetViewVolume Obsolete.

Dragger must not store information related to viewer settings.

(Inherited from SoDragger.)
Public methodGetWorldStartingPoint
(Inherited from SoDragger.)
Public methodGetWorldToLocalMatrix
Calls GetWorldToLocalMatrix((OIV.Inventor.Actions.SoAction ^)nullptr).
(Inherited from SoDragger.)
Public methodGetWorldToLocalMatrix(SoAction)
(Inherited from SoDragger.)
Public methodGLRender
(Inherited from SoBaseKit.)
Public methodGLRenderBelowPath
(Inherited from SoNode.)
Public methodGLRenderInPath
(Inherited from SoNode.)
Public methodGLRenderOffPath
(Inherited from SoNode.)
Public methodGrabEventsCleanup
(Inherited from SoNode.)
Public methodGrabEventsSetup
(Inherited from SoNode.)
Public methodHandleEvent
(Inherited from SoBaseKit.)
Public methodHasDefaultValues

Returns true if all of the object's fields have their default values.

(Inherited from SoFieldContainer.)
Public methodInvokeValueChanged

(Inherited from SoDragger.)
Public methodIsBoundingBoxIgnoring

Returns true if bounding box computation should be ignored during OIV.Inventor.Actions.SoGetBoundingBoxAction traversal.

(Inherited from SoBaseKit.)
Public methodIsNotifyEnabled

Notification is the process of telling interested objects that this object has changed.

(Inherited from SoFieldContainer.)
Public methodIsOverride

Returns the state of the override flag.

(Inherited from SoNode.)
Public methodIsPathSurrogateInMySubgraph(SoPath)
(Inherited from SoInteractionKit.)
Public methodIsPathSurrogateInMySubgraph(SoPath, SoPath, String, SoPath)
Calls IsPathSurrogateInMySubgraph(pathToCheck, pathToOwner, surrogateNameInOwner, surrogatePathInOwner, true).
(Inherited from SoInteractionKit.)
Public methodIsPathSurrogateInMySubgraph(SoPath, SoPath, String, SoPath, Boolean)
(Inherited from SoInteractionKit.)
Public methodIsSynchronizable

Gets the ScaleViz synchronizable state of this object.

(Inherited from SoBase.)
Public methodIsTrackerDirectMode
(Inherited from SoDragger.)
Public methodPick
(Inherited from SoNode.)
Public methodRayPick
(Inherited from SoBaseKit.)
Public methodRegisterChildDragger
(Inherited from SoDragger.)
Public methodRegisterChildDraggerMovingIndependently
(Inherited from SoDragger.)
Public methodSaveStartParameters
(Inherited from SoDragger.)
Public methodSearch
(Inherited from SoBaseKit.)
Public methodSet(String)

This function allows field values of parts (nodes) to be set in several different parts simultaneously.

(Inherited from SoBaseKit.)
Public methodSet(String, String)

This function allows field values of parts (nodes) to be set.

(Inherited from SoBaseKit.)
Public methodSetHandleEventAction
(Inherited from SoDragger.)
Public methodSetMinGesture(Int32)

Sets the number of pixels of movement required to initiate a constraint gesture.

(Inherited from SoDragger.)
Public methodSetMinGesture(Single) (Inherited from SoDragger.)
Public methodSetMotionMatrix

Set the motion matrix.

(Inherited from SoDragger.)
Public methodSetName (Inherited from SoBase.)
Public methodSetOverride

Turns the override flag on or off.

(Inherited from SoNode.)
Public methodSetPart

Inserts the given node (not a copy) as the new part specified by partName.

(Inherited from SoBaseKit.)
Public methodSetPartAsDefault(String, SoNode)
Calls SetPartAsDefault(partName, newNode, true).
(Inherited from SoInteractionKit.)
Public methodSetPartAsDefault(String, String)
Calls SetPartAsDefault(partName, newNodeName, true).
(Inherited from SoInteractionKit.)
Public methodSetPartAsDefault(String, SoNode, Boolean)
(Inherited from SoInteractionKit.)
Public methodSetPartAsDefault(String, String, Boolean)
(Inherited from SoInteractionKit.)
Public methodSetPartAsPath

Sets any public part in the interaction kit as a "surrogate" path instead.

(Inherited from SoInteractionKit.)
Public methodSetStartingPoint(SbVec3f)
(Inherited from SoDragger.)
Public methodSetStartingPoint(SoPickedPoint)
(Inherited from SoDragger.)
Public methodSetSynchronizable

Sets this to be a ScaleViz synchronizable object.

(Inherited from SoBase.)
Public methodSetTempPathToThis
(Inherited from SoDragger.)
Public methodSetToDefaults

Sets all fields in this object to their default values.

(Inherited from SoFieldContainer.)
Public methodSetTrackerDirectMode
Calls SetTrackerDirectMode(OIV.Inventor.Draggers.SoDragger.TrackerDirectModes( .SoDragger.DEFAULT )).
(Inherited from SoDragger.)
Public methodSetTrackerDirectMode(SoDraggerTrackerDirectModes)

Sets the tracker direct mode for this dragger (see description above).

(Inherited from SoDragger.)
Public methodSetViewportRegion Obsolete.
(Inherited from SoDragger.)
Public methodSetViewVolume Obsolete.
(Inherited from SoDragger.)
Public methodToString
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.)
Public methodTouch

Marks an instance as modified, simulating a change to it.

(Inherited from SoNode.)
Public methodTransformMatrixLocalToWorld
(Inherited from SoDragger.)
Public methodTransformMatrixToLocalSpace
(Inherited from SoDragger.)
Public methodTransformMatrixWorldToLocal
(Inherited from SoDragger.)
Public methodUnregisterChildDragger
(Inherited from SoDragger.)
Public methodUnregisterChildDraggerMovingIndependently
(Inherited from SoDragger.)
Public methodWorkFieldsIntoTransform
(Inherited from SoDragger.)
Public methodWrite
(Inherited from SoBaseKit.)
Top
Properties
  NameDescription
Public propertyangle

Angle between center and edge of beam.

Public propertyboundingBoxCaching
(Inherited from SoInteractionKit.)
Public propertyboundingBoxIgnoring

Whether to ignore this node during bounding box traversal.

(Inherited from SoBaseKit.)
Public propertyenableCallbacks

If set to false, motion, start and finish callbacks are disabled.

(Inherited from SoDragger.)
Public propertyisActive

true when mouse is down and dragging, else false.

(Inherited from SoDragger.)
Public propertyIsDisposable
ISafeDisposable interface implementation.
(Inherited from SoDisposable.)
Public propertypickCulling

Set pick caching mode.

(Inherited from SoInteractionKit.)
Public propertyrenderCaching Obsolete.

Set render caching mode.

(Inherited from SoInteractionKit.)
Public propertyrenderCulling

Set render culling mode.

(Inherited from SoInteractionKit.)
Public propertyrotation

Orientation of the rotating part (an arrow by default).

Public propertytranslation

Position of the dragger.

Public propertyUserData
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.)
Top
Events
  NameDescription
Public eventFinishDragging
(Inherited from SoDragger.)
Public eventMouseMove
(Inherited from SoDragger.)
Public eventStartDragging
(Inherited from SoDragger.)
Public eventValueChanged
(Inherited from SoDragger.)
Top
Remarks

OIV.Inventor.Draggers.SoSpotLightDragger is a composite dragger. It is shaped like a beam of light emanating from a sun-like ball. An arrow runs along the axis of the beam and extends past the end of the beam.

When you click and drag the beam, it opens and closes with an umbrella-like motion. The angle between the center and edge of the beam is stored in the OIV.Inventor.Draggers.SoSpotLightDragger.angle field of this dragger; setting the OIV.Inventor.Draggers.SoSpotLightDragger.angle field causes the beam to widen or narrow in response. The spotlight dragger does not use a standard dragger class to execute this motion. More details are given later in this section.

Dragging the arrow rotates it around the sun, and the beam moves with it. The arrow is an OIV.Inventor.Draggers.SoRotateSphericalDragger that controls the OIV.Inventor.Draggers.SoSpotLightDragger.rotation field. See the reference page for OIV.Inventor.Draggers.SoDirectionalLightDragger, which works the same way, for details.

The sun-shape can be dragged to translate all three pieces together through 3-space. Its movement controls the OIV.Inventor.Draggers.SoSpotLightDragger.translation field and works exactly as described in the reference pages for OIV.Inventor.Draggers.SoDirectionalLightDragger and OIV.Inventor.Draggers.SoPointLightDragger (which goes into more detail).

Remember: This is not a light source! It just looks like one. If you want to move a light with this dragger, you can do the following:

See the OIV.Inventor.Draggers.SoPointLightDragger and OIV.Inventor.Draggers.SoDirectionalLightDragger reference pages for other ways to control light parameters with the OIV.Inventor.Draggers.SoSpotLightDragger.rotation and OIV.Inventor.Draggers.SoSpotLightDragger.translation fields.

This class creates its own projector and handles mouse events to do its own dragging of the beam angle. When the mouse picks a point on the beam, that point is dragged in a circle just like in an OIV.Inventor.Draggers.SoRotateDiscDragger, but the plane of the disc is re-defined every time a drag is initiated. Imagine placing the metal tip of a compass at the apex of the cone and the pencil tip at the picked point. If you swing an arc through the central axis of the cone, you will be drawing the arc used to drag the beam open and closed.

The beam is opened and closed not by rotating, but by scaling. The dragger scales the beam-cone so that the height and radius change to move the picked point along the circle. Then the OIV.Inventor.Draggers.SoSpotLightDragger.angle field is calculated from the height and radius.

You can change the geometry of parts in any instance of this dragger using OIV.Inventor.Nodekits.SoBaseKit.SetPart(System.String, OIV.Inventor.Nodes.SoNode). The default part geometries are defined as resources for this OIV.Inventor.Draggers.SoSpotLightDragger class. They are detailed below in the DRAGGER RESOURCE section. You can make your program use different default resources for the parts by copying the file $OIVHOME/data/draggerDefaults/spotLightDragger.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 OIV.Inventor.Draggers.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

SpotLightDragger {
boundingBoxCaching AUTO
renderCulling AUTO
pickCulling AUTO
isActive false
rotation 0 0 1 0
translation 0 0 0
angle 1
callbackList NULL
material <spotLightOverallMaterial resource>
translator DragPointDragger { }
rotator RotateSphericalDragger { }
beamPlacement <spotLightBeamPlacement resource>
beamScale Scale {
scaleFactor 0.841471 0.841471 0.540302
}
beam <spotLightBeam resource>
beamActive <spotLightBeamActive resource>
rotator.rotator <spotLightRotatorRotator resource>
rotator.rotatorActive <spotLightRotatorRotatorActive resource>
rotator.feedback <spotLightRotatorFeedback resource>
rotator.feedbackActive <spotLightRotatorFeedbackActive resource>
translator.yzTranslator.translator <spotLightTranslatorPlaneTranslator resource>
translator.xzTranslator.translator <spotLightTranslatorPlaneTranslator resource>
translator.xyTranslator.translator <spotLightTranslatorPlaneTranslator resource>
translator.yzTranslator.translatorActive <spotLightTranslatorPlaneTranslatorActive resource>
translator.xzTranslator.translatorActive <spotLightTranslatorPlaneTranslatorActive resource>
translator.xyTranslator.translatorActive <spotLightTranslatorPlaneTranslatorActive resource>
translator.xTranslator.translator <spotLightTranslatorLineTranslator resource>
translator.yTranslator.translator <spotLightTranslatorLineTranslator resource>
translator.zTranslator.translator <spotLightTranslatorLineTranslator resource>
translator.xTranslator.translatorActive <spotLightTranslatorLineTranslatorActive resource>
translator.yTranslator.translatorActive <spotLightTranslatorLineTranslatorActive resource>
translator.zTranslator.translatorActive <spotLightTranslatorLineTranslatorActive resource>
}

DRAGGER RESOURCES

Resource: spotLightBeam
Part: beam
Appearance: wireframe cone with no OIV.Inventor.Nodes.SoMaterial node
Description: picking this initiates dragging of the beam angle. The beam inherits colors from the material part, just like the stationary version of the sun shape.
Resource: spotLightBeamActive
Part: beamActive
Appearance: yellow wireframe cone
Description: displayed during dragging of the beam angle.
Resource: spotLightBeamPlacement
Part: beamPlacement
Appearance: translation of (0,0,-1)
Description: This translation node moves the beam parts relative to the rest of the dragger. In this case, moving by (0,0,-1) slides the cone outward along rotator part toward its arrowhead. The distance chosen places the apex of the cone on the surface of the sun shape.
Resource: spotLightRotatorRotator
Part: rotator.rotator
Appearance: white arrow that goes through the sun
Description: picking this begins rotation of the arrow about the sun-shape
Resource: spotLightRotatorRotatorActive
Part: rotator.rotatorActive
Appearance: yellow arrow that goes through the sun
Description: displayed while the arrow is being rotated
Resource: spotLightRotatorFeedback
Part: rotator.feedback
Appearance: empty Separator
Description: this disables display of the axes that a rotateSpherical dragger uses by default
Resource: spotLightRotatorFeedbackActive
Part: rotator.feedbackActive
Appearance: empty Separator
Description: this disables display of the axes that a rotateSpherical dragger uses by default
Resource: spotLightOverallMaterial
Part: material
Appearance: white. half strength emissive, half strength diffuse
Description: sets material for the sun shape when stationary. Resource for the moving sun, spotLightTranslatorPlaneTranslatorActive, contains a yellow material for highlighting.
Resource: spotLightTranslatorPlaneTranslator
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: spotLightTranslatorPlaneTranslatorActive
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: spotLightTranslatorLineTranslator
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: spotLightTranslatorLineTranslatorActive
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.

CATALOG PARTS

All Parts
Part NamePart TypeDefault TypeNULL Default
callbackList NodeKitListPart yes
material Material yes
translator DragPointDragger yes
rotator RotateSphericalDragger yes
beamPlacement Translation yes
beamScale Scale yes
beam Separator yes
beamActive Separator yes

Extra Information for List Parts from Above Table
Part NameContainer TypePossible Types
callbackList Separator Callback, EventCallback

See Also