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

SoTransformBoxDragger — box-like object you scale, rotate, and translate by dragging with the mouse

Catalog Parts

       ┌───────────────────────────────────────────────────────────────────┐
       │                             Allparts                             │
       │                                                           NULLby │
       │ PartNamePartTypeDefaultTypeDefault │
       │                                                                   │
       │ callbackList    NodeKitListPart            --               yes   │
       │ surroundScale   SurroundScale              --               yes   │
       │ antiSquish      AntiSquish                 --               no    │
       │ scaler          ScaleUniformDragger        --               yes   │
       │ rotator1        RotateCylindricalDragger   --               yes   │
       │ rotator2        RotateCylindricalDragger   --               yes   │
       │ rotator3        RotateCylindricalDragger   --               yes   │
       │ translator1     Translate2Dragger          --               yes   │
       │ translator2     Translate2Dragger          --               yes   │
       │ translator3     Translate2Dragger          --               yes   │
       │ translator4     Translate2Dragger          --               yes   │
       │ translator5     Translate2Dragger          --               yes   │
       │ translator6     Translate2Dragger          --               yes   │
       │                                                                   │
       └───────────────────────────────────────────────────────────────────┘
       ┌────────────────────────────────────────────────────────────────┐
       │       Extrainformationforlistpartsfromabovetable        │
       │                                                                │
       │ PartNameContainerTypePermissibleTypes              │
       │                                                                │
       │ callbackList   Separator        Callback, EventCallback        │
       │                                                                │
       └────────────────────────────────────────────────────────────────┘

Description

SoTransformBoxDragger is a composite dragger shaped like a box with small cubes at the corners. Click and
       drag any of these cubes to scale the box uniformly. Drag any edge of the box to rotate the whole  dragger
       about its center, along an axis parallel to that edge. Pick any face of the box for 2D translation in the
       plane of that face.

       Although the box looks just about like a wireframe cube, it is composed of many different simple draggers
       arranged  in  a  composite  assembly. When one part is dragged, the transformBox makes sure they all move
       together. Each of the parts of the box is a different dragger with  the  default  geometry  changed.  The
       faces  of  the box are SoTranslate2Draggers, the edges are SoRotateCylindricalDraggers, and the cubes are
       an SoScaleUniformDragger. Drag them and the dragger will update its translation, rotation and scaleFactor
       fields to reflect the changes. As with all draggers, if you change the fields the dragger  will  move  to
       match the new settings.

       Remember:  This  is  not  an  SoTransform!.  If you want to move other objects with this dragger, you can
       either:

       [a] Use an SoTransformBoxManip, which is subclassed from SoTransform. It creates one  of  these  draggers
       and uses it as the interface to change its fields. (see the SoTransformBoxManip man page).

       [b] Use field-to-field connections to connect the fields of this dragger to those of any SoTransformation
       node.

       You can change the parts in any instance of this dragger using setPart(). The default part geometries are
       defined  as  resources  for  this SoTransformBoxDragger 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/transformBoxDragger.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:         transformBoxScalerScaler
       .in 0n+.5i
     Part:             scaler.scaler
     Appearance:       Eight small white cubes at the corners of the box
     Description:      Picking this initiates uniform 3D scaling of the dragger.

                         .in 0n+.5i
     Resource:         transformBoxScalerScalerActive
                         .in 0n+.5i
     Part:             scaler.scalerActive
     Appearance:       Yellow version of the regular scaler part
     Description:      Displayed while the dragger is being scaled.

                         .in 0n+.5i
     Resource:         transformBoxScalerFeedback
                         .in 0n+.5i
     Part:             scaler.feedback
     Appearance:       Empty separator
     Description:      Removes any feedback geometry created in the constructor of the SoScaleUniformDragger.

                         .in 0n+.5i
     Resource:         transformBoxScalerFeedbackActive
                         .in 0n+.5i
     Part:             scaler.feedbackActive
     Appearance:       Empty separator
     Description:      Removes    any    feedbackActive   geometry   created   in   the   constructor   of   the
                         SoScaleUniformDragger.

                         .in 0n+.5i
     Resource:         transformBoxRotatorRotator
                         .in 0n+.5i
     Parts:            rotator1.rotator
                                           rotator2.rotator
                                           rotator3.rotator
     Appearance:       Four white lines along the edges of the box
     Description:      Picking this begins rotational dragging. In each of the three rotateCylindrical draggers,
                         the lines of the rotator part are oriented parallel to the axis of rotation.

                         .in 0n+.5i
     Resource:         transformBoxRotatorRotatorActive
                         .in 0n+.5i
     Parts:            rotator1.rotatorActive
                                           rotator2.rotatorActive
                                           rotator3.rotatorActive
     Appearance:       Four yellow lines along the edges of the box
     Description:      Displayed while the dragger is being rotated

                         .in 0n+.5i
     Resource:         transformBoxRotatorFeedback
                         .in 0n+.5i
     Parts:            rotator1.feedback
                                           rotator2.feedback
                                           rotator3.feedback
     Appearance:       Empty separator
     Description:      Removes   any    feedback    geometry    created    in    the    constructor    of    the
                         SoRotateCylindricalDragger.

                         .in 0n+.5i
     Resource:         transformBoxRotatorFeedbackActive
                         .in 0n+.5i
     Parts:            rotator1.feedbackActive
                                           rotator2.feedbackActive
                                           rotator3.feedbackActive
     Appearance:       Thin purple line through center of box
     Description:      Displayed to show axis of rotation during rotational dragging.

                         .in 0n+.5i
     Resource:         transformBoxTranslatorTranslator
                         .in 0n+.5i
     Parts:            translator1.translator
                                           translator2.translator
                                           translator3.translator
                                           translator4.translator
                                           translator5.translator
                                           translator6.translator
     Appearance:       Invisible but pickable square surface
     Description:      Picking  these  begins 2-D translational dragging within the plane of one of the sides of
                         the box. The invisible squares of the six translate2Draggers are arranged to  form  the
                         sides  of  the  box.   The squares are easy to discern, although rendered as invisible;
                         they are bounded by the lines of the rotational dragger parts.

                         .in 0n+.5i
     Resource:         transformBoxTranslatorTranslatorActive
                         .in 0n+.5i
     Parts:            translator1.translatorActive
                                           translator2.translatorActive
                                           translator3.translatorActive
                                           translator4.translatorActive
                                           translator5.translatorActive
                                           translator6.translatorActive
     Appearance:       Invisible square surface
     Description:      Shown during 2-D translational dragging.

                         .in 0n+.5i
     Resource:         transformBoxTranslatorXAxisFeedback
                         .in 0n+.5i
     Parts:            translator1.xAxisFeedback
                                           translator2.xAxisFeedback
                                           translator3.xAxisFeedback
                                           translator4.xAxisFeedback
                                           translator5.xAxisFeedback
                                           translator6.xAxisFeedback
     Appearance:       Short thin purple line
     Description:      Only shown if dragger is moving and the axis is a permissable direction of  motion.  When
                         pressing  <shift>,  motion  is  constrained,  and this is displayed only if the primary
                         motion is in the X direction.

                         .in 0n+.5i
     Resource:         transformBoxTranslatorYAxisFeedback
                         .in 0n+.5i
     Parts:            translator1.yAxisFeedback
                                           translator2.yAxisFeedback
                                           translator3.yAxisFeedback
                                           translator4.yAxisFeedback
                                           translator5.yAxisFeedback
                                           translator6.yAxisFeedback
     Appearance:       Short thin purple line
     Description:      Only shown if dragger is moving and the axis is a permissable direction of  motion.  When
                         pressing  <shift>,  motion  is  constrained,  and this is displayed only if the primary
                         motion is in the Y direction.

Fields

SoSFRotationrotation
          Orientation of the dragger.

     SoSFVec3ftranslation
          Position of the dragger.

     SoSFVec3fscaleFactor
          Scale of the dragger.

File Format/Defaults

TransformBoxDragger{renderCachingAUTOboundingBoxCachingAUTOrenderCullingAUTOpickCullingAUTOisActiveFALSErotation0010translation000scaleFactor111callbackListNULLsurroundScaleNULLantiSquishAntiSquish{sizingBIGGEST_DIMENSION}scalerScaleUniformDragger{}rotator1RotateCylindricalDragger{}rotator2RotateCylindricalDragger{}rotator3RotateCylindricalDragger{}translator1Translate2Dragger{}translator2Translate2Dragger{}translator3Translate2Dragger{}translator4Translate2Dragger{}translator5Translate2Dragger{}translator6Translate2Dragger{}scaler.scaler<transformBoxScalerScalerresource>scaler.scalerActive<transformBoxScalerScalerActiveresource>scaler.feedback<transformBoxScalerFeedbackresource>scaler.feedbackActive<transformBoxScalerFeedbackActiveresource>rotator1.rotator<transformBoxRotatorRotatorresource>rotator2.rotator<transformBoxRotatorRotatorresource>rotator3.rotator<transformBoxRotatorRotatorresource>rotator1.rotatorActive<transformBoxRotatorRotatorActiveresource>rotator2.rotatorActive<transformBoxRotatorRotatorActiveresource>rotator3.rotatorActive<transformBoxRotatorRotatorActiveresource>rotator1.feedback<transformBoxRotatorFeedbackresource>rotator2.feedback<transformBoxRotatorFeedbackresource>rotator3.feedback<transformBoxRotatorFeedbackresource>rotator1.feedbackActive<transformBoxRotatorFeedbackActiveresource>rotator2.feedbackActive<transformBoxRotatorFeedbackActiveresource>rotator3.feedbackActive<transformBoxRotatorFeedbackActiveresource>translator1.translator<transformBoxTranslatorTranslatorresource>translator2.translator<transformBoxTranslatorTranslatorresource>translator3.translator<transformBoxTranslatorTranslatorresource>translator4.translator<transformBoxTranslatorTranslatorresource>translator5.translator<transformBoxTranslatorTranslatorresource>translator6.translator<transformBoxTranslatorTranslatorresource>translator1.translatorActive<transformBoxTranslatorTranslatorActiveresource>translator2.translatorActive<transformBoxTranslatorTranslatorActiveresource>translator3.translatorActive<transformBoxTranslatorTranslatorActiveresource>translator4.translatorActive<transformBoxTranslatorTranslatorActiveresource>translator5.translatorActive<transformBoxTranslatorTranslatorActiveresource>translator6.translatorActive<transformBoxTranslatorTranslatorActiveresource>translator1.xAxisFeedback<transformBoxTranslatorXAxisFeedbackresource>translator2.xAxisFeedback<transformBoxTranslatorXAxisFeedbackresource>translator3.xAxisFeedback<transformBoxTranslatorXAxisFeedbackresource>translator4.xAxisFeedback<transformBoxTranslatorXAxisFeedbackresource>translator5.xAxisFeedback<transformBoxTranslatorXAxisFeedbackresource>translator6.xAxisFeedback<transformBoxTranslatorXAxisFeedbackresource>translator1.yAxisFeedback<transformBoxTranslatorYAxisFeedbackresource>translator2.yAxisFeedback<transformBoxTranslatorYAxisFeedbackresource>translator3.yAxisFeedback<transformBoxTranslatorYAxisFeedbackresource>translator4.yAxisFeedback<transformBoxTranslatorYAxisFeedbackresource>translator5.yAxisFeedback<transformBoxTranslatorYAxisFeedbackresource>translator6.yAxisFeedback<transformBoxTranslatorYAxisFeedbackresource>}

Inherits From

       SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTransformBoxDragger

Methods

SoTransformBoxDragger()
          Constructor.

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

     staticSoTypegetClassTypeId()
          Returns type identifier for this class.

Name

       SoTransformBoxDragger — box-like object you scale, rotate, and translate by dragging with the mouse

See Also

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

Synopsis

#include<Inventor/draggers/SoTransformBoxDragger.h>

          Fields from class SoTransformBoxDragger:

     SoSFRotationrotationSoSFVec3ftranslationSoSFVec3fscaleFactor

          Fields from class SoDragger:

     SoSFBoolisActive

          Fields from class SoInteractionKit:

     SoSFEnumrenderCachingSoSFEnumboundingBoxCachingSoSFEnumrenderCullingSoSFEnumpickCulling

          Parts from class SoBaseKit:

     (SoNodeKitListPart)callbackList

          Methods from class SoTransformBoxDragger:

                         SoTransformBoxDragger()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