logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SoPointLightDragger — sun-shaped icon you can translate in 3D by dragging with the mouse

Catalog Parts

       ┌──────────────────────────────────────────────────────────┐
       │                        Allparts                         │
       │                                                  NULLby │
       │ PartNamePartTypeDefaultTypeDefault │
       │                                                          │
       │ callbackList   NodeKitListPart    --               yes   │
       │ material       Material           --               yes   │
       │ translator     DragPointDragger   --               yes   │
       │                                                          │
       └──────────────────────────────────────────────────────────┘
       ┌────────────────────────────────────────────────────────────────┐
       │       Extrainformationforlistpartsfromabovetable        │
       │                                                                │
       │ PartNameContainerTypePermissibleTypes              │
       │                                                                │
       │ callbackList   Separator        Callback, EventCallback        │
       │                                                                │
       └────────────────────────────────────────────────────────────────┘

Description

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:

       [a] Use an SoPointLightManip, which is subclassed from SoLight. It creates one of these draggers and uses
       it  as  the  interface  to  change  the location of its light source (see the SoPointLightManip reference
       page). The manipulator also edits the material part of this dragger to  match  the  color  of  light  the
       manipulator is producing.

       [b]  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
       /usr/share/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.

Dragger Resources

       .in 0n+.5i
     Resource:         pointLightOverallMaterial
       .in 0n+.5i
     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.

                         .in 0n+.5i
     Resource:         pointLightTranslatorPlaneTranslator
                         .in 0n+.5i
     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.

                         .in 0n+.5i
     Resource:         pointLightTranslatorPlaneTranslatorActive
                         .in 0n+.5i
     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.

                         .in 0n+.5i
     Resource:         pointLightTranslatorLineTranslator
                         .in 0n+.5i
     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.

                         .in 0n+.5i
     Resource:         pointLightTranslatorLineTranslatorActive
                         .in 0n+.5i
     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.

Fields

SoSFVec3ftranslation
          Position of the dragger.

File Format/Defaults

PointLightDragger{renderCachingAUTOboundingBoxCachingAUTOrenderCullingAUTOpickCullingAUTOisActiveFALSEtranslation000callbackListNULLmaterial<pointLightOverallMaterialresource>translatorDragPointDragger{}translator.yzTranslator.translator<pointLightTranslatorPlaneTranslatorresource>translator.xzTranslator.translator<pointLightTranslatorPlaneTranslatorresource>translator.xyTranslator.translator<pointLightTranslatorPlaneTranslatorresource>translator.yzTranslator.translatorActive<pointLightTranslatorPlaneTranslatorActiveresource>translator.xzTranslator.translatorActive<pointLightTranslatorPlaneTranslatorActiveresource>translator.xyTranslator.translatorActive<pointLightTranslatorPlaneTranslatorActiveresource>translator.xTranslator.translator<pointLightTranslatorLineTranslatorresource>translator.yTranslator.translator<pointLightTranslatorLineTranslatorresource>translator.zTranslator.translator<pointLightTranslatorLineTranslatorresource>translator.xTranslator.translatorActive<pointLightTranslatorLineTranslatorActiveresource>translator.yTranslator.translatorActive<pointLightTranslatorLineTranslatorActiveresource>translator.zTranslator.translatorActive<pointLightTranslatorLineTranslatorActiveresource>}

Inherits From

       SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoPointLightDragger

Methods

SoPointLightDragger()
          Constructor.

     staticconstSoNodekitCatalog*getClassNodekitCatalog()const
          Returns an SoNodekitCatalog for this class

     staticSoTypegetClassTypeId()
          Returns type identifier for this class.

Name

       SoPointLightDragger — sun-shaped icon you can translate in 3D by dragging with the mouse

See Also

SoInteractionKit,SoDragger,SoCenterballDragger,SoDirectionalLightDragger,SoDragPointDragger,SoHandleBoxDragger,SoJackDragger,SoRotateCylindricalDragger,SoRotateDiscDragger,SoRotateSphericalDragger,SoScale1Dragger,SoScale2Dragger,SoScale2UniformDragger,SoScaleUniformDragger,SoSpotLightDragger,SoTabBoxDragger,SoTabPlaneDragger,SoTrackballDragger,SoTransformBoxDragger,SoTransformerDragger,SoTranslate1Dragger,SoTranslate2DraggerSoPointLightDragger(3IV)()

Synopsis

#include<Inventor/draggers/SoPointLightDragger.h>

          Fields from class SoPointLightDragger:

     SoSFVec3ftranslation

          Fields from class SoDragger:

     SoSFBoolisActive

          Fields from class SoInteractionKit:

     SoSFEnumrenderCachingSoSFEnumboundingBoxCachingSoSFEnumrenderCullingSoSFEnumpickCulling

          Parts from class SoBaseKit:

     (SoNodeKitListPart)callbackList

          Methods from class SoPointLightDragger:

                         SoPointLightDragger()staticconstSoNodekitCatalog*getClassNodekitCatalog()conststaticSoTypegetClassTypeId()

          Methods from class SoDragger:

     voidaddStartCallback(SoDraggerCB*f,void*userData=NULL)voidremoveStartCallback(SoDraggerCB*f,void*userData=NULL)voidaddMotionCallback(SoDraggerCB*f,void*userData=NULL)voidremoveMotionCallback(SoDraggerCB*f,void*userData=NULL)voidaddFinishCallback(SoDraggerCB*f,void*userData=NULL)voidremoveFinishCallback(SoDraggerCB*f,void*userData=NULL)voidaddValueChangedCallback(SoDraggerCB*f,void*userData=NULL)voidremoveValueChangedCallback(SoDraggerCB*f,void*userData=NULL)SbBoolenableValueChangedCallbacks()voidsetMinGesture(intpixels)intgetMinGesture()conststaticvoidsetMinScale(floatnewMinScale)staticfloatgetMinScale()

          Methods from class SoInteractionKit:

     virtualSbBoolsetPartAsPath(constSbName&partName,SoPath*surrogatePath)

          Methods from class SoBaseKit:

     virtualconstSoNodekitCatalog*getNodekitCatalog()constvirtualSoNode*getPart(constSbName&partName,SbBoolmakeIfNeeded)SbStringgetPartString(constSoBase*part)virtualSoNodeKitPath*createPathToPart(constSbName&partName,SbBoolmakeIfNeeded,constSoPath*pathToExtend=NULL)virtualSbBoolsetPart(constSbName&partName,SoNode*newPart)SbBoolset(char*partName,char*parameters)SbBoolset(char*nameValuePairs)staticSbBoolisSearchingChildren()staticvoidsetSearchingChildren(SbBoolnewVal)

          Methods from class SoNode:

     voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)

          Methods from class SoFieldContainer:

     voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)

          Methods from class SoBase:

     voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const

          Macros from class SoBaseKit:

     SO_GET_PART(kit,partName,partClass)SO_CHECK_PART(kit,partName,partClass)

See Also