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

SoHandleBoxDragger — box you can scale, stretch and translate by dragging with the mouse

Catalog Parts

       ┌──────────────────────────────────────────────────────────────┐
       │                          Allparts                           │
       │                                                      NULLby │
       │ PartNamePartTypeDefaultTypeDefault │
       │                                                              │
       │ callbackList        NodeKitListPart   --               yes   │
       │ surroundScale       SurroundScale     --               yes   │
       │ translator1         Separator         --               yes   │
       │ translator1Active   Separator         --               yes   │
       │ translator2         Separator         --               yes   │
       │ translator2Active   Separator         --               yes   │
       │ translator3         Separator         --               yes   │
       │ translator3Active   Separator         --               yes   │
       │ translator4         Separator         --               yes   │
       │ translator4Active   Separator         --               yes   │
       │ translator5         Separator         --               yes   │
       │ translator5Active   Separator         --               yes   │
       │ translator6         Separator         --               yes   │
       │ translator6Active   Separator         --               yes   │
       │ extruder1           Separator         --               yes   │
       │ extruder1Active     Separator         --               yes   │
       │ extruder2           Separator         --               yes   │
       │ extruder2Active     Separator         --               yes   │
       │ extruder3           Separator         --               yes   │
       │ extruder3Active     Separator         --               yes   │
       │ extruder4           Separator         --               yes   │
       │ extruder4Active     Separator         --               yes   │
       │ extruder5           Separator         --               yes   │
       │ extruder5Active     Separator         --               yes   │
       │ extruder6           Separator         --               yes   │
       │ extruder6Active     Separator         --               yes   │
       │ uniform1            Separator         --               yes   │
       │ uniform1Active      Separator         --               yes   │
       │ uniform2            Separator         --               yes   │
       │ uniform2Active      Separator         --               yes   │
       │ uniform3            Separator         --               yes   │
       │ uniform3Active      Separator         --               yes   │
       │ uniform4            Separator         --               yes   │
       │ uniform4Active      Separator         --               yes   │
       │ uniform5            Separator         --               yes   │
       │ uniform5Active      Separator         --               yes   │
       │ uniform6            Separator         --               yes   │
       │ uniform6Active      Separator         --               yes   │
       │ uniform7            Separator         --               yes   │
       │ uniform7Active      Separator         --               yes   │
       │ uniform8            Separator         --               yes   │
       │ uniform8Active      Separator         --               yes   │
       │ arrow1              Separator         --               yes   │
       │ arrow2              Separator         --               yes   │
       │ arrow3              Separator         --               yes   │
       │ arrow4              Separator         --               yes   │
       │ arrow5              Separator         --               yes   │
       │ arrow6              Separator         --               yes   │
       │                                                              │
       └──────────────────────────────────────────────────────────────┘
       ┌────────────────────────────────────────────────────────────────┐
       │       Extrainformationforlistpartsfromabovetable        │
       │                                                                │
       │ PartNameContainerTypePermissibleTypes              │
       │                                                                │
       │ callbackList   Separator        Callback, EventCallback        │
       │                                                                │
       └────────────────────────────────────────────────────────────────┘

Description

SoHandleBoxDragger is a dragger shaped like a wireframe box with  small  cornercubes  mounted  on  each
       corner. Click and drag any of these cubes to scale the box uniformly. Six other centercubes are centered
       on  the  sides  of the box; white lines connect them to the center of the dragger. Drag one of the center
       cubes along its line to stretch the box in that direction. Dragging a face  of  the  box  translates  the
       dragger within that plane.

       While you drag a face of the box, purple feedbackarrows display the possible directions of motion. Press
       the  <Shift>  key to constrain the motion to one of the two major directions in the plane. The constraint
       direction is chosen based on the next user  gesture.  Press  the  <Control>  key  and  the  dragger  will
       translate perpendicular to that plane. The translation field is modified as the face is dragged.

       By default, dragging any of the small cubes scales about the center of the object. Pressing the <Control>
       key  changes this: A corner cube will scale about its opposite corner. A center cube will scale about the
       center of its opposite face. Dragging one of the small cubes will usually result in changes to  both  the
       scaleFactor  and  translation fields. This is because any scale about a point other than the origin has a
       translation element.

       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 SoHandleBoxManip, which is subclassed from SoTransform. It creates one of these draggers and
       uses it as the interface to change its fields. (see the SoHandleBoxManip reference 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 SoHandleBoxDragger 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/handleBoxDragger.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:         handleBoxTranslator1
       .in 0n+.5i
     Part:             translator1
     Appearance:       White Line-Style Square
     Description:      Top face of handleBox. Picking this initiates scaling in x-z plane.

                         .in 0n+.5i
     Resource:         handleBoxTranslator2
                         .in 0n+.5i
     Part:             translator2
     Appearance:       White Line-Style Square
     Description:      Bottom face of handleBox. Picking this initiates scaling in x-z plane.

                         .in 0n+.5i
     Resource:         handleBoxTranslator3
                         .in 0n+.5i
     Part:             translator3
     Appearance:       White Line-Style Square
     Description:      Left face of handleBox. Picking this initiates scaling in y-z plane.

                         .in 0n+.5i
     Resource:         handleBoxTranslator4
                         .in 0n+.5i
     Part:             translator4
     Appearance:       White Line-Style Square
     Description:      Right face of handleBox. Picking this initiates scaling in y-z plane.

                         .in 0n+.5i
     Resource:         handleBoxTranslator5
                         .in 0n+.5i
     Part:             translator5
     Appearance:       White Line-Style Square
     Description:      Front face of handleBox. Picking this initiates scaling in x-y plane.

                         .in 0n+.5i
     Resource:         handleBoxTranslator6
                         .in 0n+.5i
     Part:             translator6
     Appearance:       White Line-Style Square
     Description:      Back face of handleBox. Picking this initiates scaling in x-y plane.

                         .in 0n+.5i
     Resource:         handleBoxTranslator1Active
                         .in 0n+.5i
     Part:             translator1Active
     Appearance:       Yellow version of handleBoxTranslator1
     Description:      Replaces handleBoxTranslator1 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxTranslator2Active
                         .in 0n+.5i
     Part:             translator2Active
     Appearance:       Yellow version of handleBoxTranslator2
     Description:      Replaces handleBoxTranslator2 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxTranslator3Active
                         .in 0n+.5i
     Part:             translator3Active
     Appearance:       Yellow version of handleBoxTranslator3
     Description:      Replaces handleBoxTranslator3 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxTranslator4Active
                         .in 0n+.5i
     Part:             translator4Active
     Appearance:       Yellow version of handleBoxTranslator4
     Description:      Replaces handleBoxTranslator4 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxTranslator5Active
                         .in 0n+.5i
     Part:             translator5Active
     Appearance:       Yellow version of handleBoxTranslator5
     Description:      Replaces handleBoxTranslator5 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxTranslator6Active
                         .in 0n+.5i
     Part:             translator6Active
     Appearance:       Yellow version of handleBoxTranslator6
     Description:      Replaces handleBoxTranslator6 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxExtruder1
                         .in 0n+.5i
     Part:             extruder1
     Appearance:       Small white cube at (0,1.25,0) with line to origin
     Description:      Selecting this part initiates 1-D scaling along Y axis.

                         .in 0n+.5i
     Resource:         handleBoxExtruder2
                         .in 0n+.5i
     Part:             extruder2
     Appearance:       Small white cube at (0,-1.25,0) with line to origin
     Description:      Selecting this part initiates 1-D scaling along Y axis.

                         .in 0n+.5i
     Resource:         handleBoxExtruder3
                         .in 0n+.5i
     Part:             extruder3
     Appearance:       Small white cube at (-1.25,0,0) with line to origin
     Description:      Selecting this part initiates 1-D scaling along X axis.

                         .in 0n+.5i
     Resource:         handleBoxExtruder4
                         .in 0n+.5i
     Part:             extruder4
     Appearance:       Small white cube at (1.25,0,0) with line to origin
     Description:      Selecting this part initiates 1-D scaling along X axis.

                         .in 0n+.5i
     Resource:         handleBoxExtruder5
                         .in 0n+.5i
     Part:             extruder5
     Appearance:       Small white cube at (0,0,1.25) with line to origin
     Description:      Selecting this part initiates 1-D scaling along Z axis.

                         .in 0n+.5i
     Resource:         handleBoxExtruder6
                         .in 0n+.5i
     Part:             extruder6
     Appearance:       Small white cube at (0,0,-1.25) with line to origin
     Description:      Selecting this part initiates 1-D scaling along Z axis.

                         .in 0n+.5i
     Resource:         handleBoxExtruder1Active
                         .in 0n+.5i
     Part:             extruder1Active
     Appearance:       Yellow version of handleBoxExtruder1
     Description:      Replaces handleBoxExtruder1 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxExtruder2Active
                         .in 0n+.5i
     Part:             extruder2Active
     Appearance:       Yellow version of handleBoxExtruder1
     Description:      Replaces handleBoxExtruder1 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxExtruder3Active
                         .in 0n+.5i
     Part:             extruder3Active
     Appearance:       Yellow version of handleBoxExtruder3
     Description:      Replaces handleBoxExtruder3 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxExtruder4Active
                         .in 0n+.5i
     Part:             extruder4Active
     Appearance:       Yellow version of handleBoxExtruder4
     Description:      Replaces handleBoxExtruder4 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxExtruder5Active
                         .in 0n+.5i
     Part:             extruder5Active
     Appearance:       Yellow version of handleBoxExtruder5
     Description:      Replaces handleBoxExtruder5 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxExtruder6Active
                         .in 0n+.5i
     Part:             extruder6Active
     Appearance:       Yellow version of handleBoxExtruder6
     Description:      Replaces handleBoxExtruder6 during dragging.

                         .in 0n+.5i
     Resource:         handleBoxUniform1
                         .in 0n+.5i
     Part:             uniform1
     Appearance:       Small white cube in (+x+y+z) corner of handleBox
     Description:      Picking this initiates uniform scaling.

                         .in 0n+.5i
     Resource:         handleBoxUniform2
                         .in 0n+.5i
     Part:             uniform2
     Appearance:       Small white cube in (+x+y-z) corner of handleBox
     Description:      Picking this initiates uniform scaling.

                         .in 0n+.5i
     Resource:         handleBoxUniform3
                         .in 0n+.5i
     Part:             uniform3
     Appearance:       Small white cube in (+x-y+z) corner of handleBox
     Description:      Picking this initiates uniform scaling.

                         .in 0n+.5i
     Resource:         handleBoxUniform4
                         .in 0n+.5i
     Part:             uniform4
     Appearance:       Small white cube in (+x-y-z) corner of handleBox
     Description:      Picking this initiates uniform scaling.

                         .in 0n+.5i
     Resource:         handleBoxUniform5
                         .in 0n+.5i
     Part:             uniform5
     Appearance:       Small white cube in (-x+y+z) corner of handleBox
     Description:      Picking this initiates uniform scaling.

                         .in 0n+.5i
     Resource:         handleBoxUniform6
                         .in 0n+.5i
     Part:             uniform6
     Appearance:       Small white cube in (-x+y-z) corner of handleBox
     Description:      Picking this initiates uniform scaling.

                         .in 0n+.5i
     Resource:         handleBoxUniform7
                         .in 0n+.5i
     Part:             uniform7
     Appearance:       Small white cube in (-x-y+z) corner of handleBox
     Description:      Picking this initiates uniform scaling.

                         .in 0n+.5i
     Resource:         handleBoxUniform8
                         .in 0n+.5i
     Part:             uniform8
     Appearance:       Small white cube in (-x-y-z) corner of handleBox
     Description:      Picking this initiates uniform scaling.

                         .in 0n+.5i
     Resource:         handleBoxUniform1Active
                         .in 0n+.5i
     Part:             uniform1Active
     Appearance:       Yellow version of handleBoxUniform1Active
     Description:      Replaces handleBoxUniform1Active during dragging.

                         .in 0n+.5i
     Resource:         handleBoxUniform2Active
                         .in 0n+.5i
     Part:             uniform2Active
     Appearance:       Yellow version of handleBoxUniform1Active
     Description:      Replaces handleBoxUniform1Active during dragging.

                         .in 0n+.5i
     Resource:         handleBoxUniform3Active
                         .in 0n+.5i
     Part:             uniform3Active
     Appearance:       Yellow version of handleBoxUniform1Active
     Description:      Replaces handleBoxUniform1Active during dragging.

                         .in 0n+.5i
     Resource:         handleBoxUniform4Active
                         .in 0n+.5i
     Part:             uniform4Active
     Appearance:       Yellow version of handleBoxUniform1Active
     Description:      Replaces handleBoxUniform1Active during dragging.

                         .in 0n+.5i
     Resource:         handleBoxUniform5Active
                         .in 0n+.5i
     Part:             uniform5Active
     Appearance:       Yellow version of handleBoxUniform1Active
     Description:      Replaces handleBoxUniform1Active during dragging.

                         .in 0n+.5i
     Resource:         handleBoxUniform6Active
                         .in 0n+.5i
     Part:             uniform6Active
     Appearance:       Yellow version of handleBoxUniform1Active
     Description:      Replaces handleBoxUniform1Active during dragging.

                         .in 0n+.5i
     Resource:         handleBoxUniform7Active
                         .in 0n+.5i
     Part:             uniform7Active
     Appearance:       Yellow version of handleBoxUniform1Active
     Description:      Replaces handleBoxUniform1Active during dragging.

                         .in 0n+.5i
     Resource:         handleBoxUniform8Active
                         .in 0n+.5i
     Part:             uniform8Active
     Appearance:       Yellow version of handleBoxUniform1Active
     Description:      Replaces handleBoxUniform1Active during dragging.

                         .in 0n+.5i
     Resource:         handleBoxArrow1
                         .in 0n+.5i
     Part:             arrow1
     Appearance:       Purple Arrow, pointing up
     Description:      Displayed when translating if Y direction is permitted.

                         .in 0n+.5i
     Resource:         handleBoxArrow2
                         .in 0n+.5i
     Part:             arrow2
     Appearance:       Purple Arrow, pointing down
     Description:      Displayed when translating if Y direction is permitted.

                         .in 0n+.5i
     Resource:         handleBoxArrow3
                         .in 0n+.5i
     Part:             arrow3
     Appearance:       Purple Arrow, pointing left
     Description:      Displayed when translating if X direction is permitted.

                         .in 0n+.5i
     Resource:         handleBoxArrow4
                         .in 0n+.5i
     Part:             arrow4
     Appearance:       Purple Arrow, pointing right
     Description:      Displayed when translating if X direction is permitted.

                         .in 0n+.5i
     Resource:         handleBoxArrow5
                         .in 0n+.5i
     Part:             arrow5
     Appearance:       Purple Arrow, pointing forward
     Description:      Displayed when translating if Z direction is permitted.

                         .in 0n+.5i
     Resource:         handleBoxArrow6
                         .in 0n+.5i
     Part:             arrow6
     Appearance:       Purple Arrow, pointing backward
     Description:      Displayed when translating if Z direction is permitted.

Fields

SoSFVec3fscaleFactor
          Scale of the dragger.

     SoSFVec3ftranslation
          Position of the dragger.

File Format/Defaults

HandleBoxDragger{renderCachingAUTOboundingBoxCachingAUTOrenderCullingAUTOpickCullingAUTOisActiveFALSEtranslation000scaleFactor111callbackListNULLsurroundScaleNULLtranslator1<handleBoxTranslator1resource>translator1Active<handleBoxTranslator1Activeresource>translator2<handleBoxTranslator2resource>translator2Active<handleBoxTranslator2Activeresource>translator3<handleBoxTranslator3resource>translator3Active<handleBoxTranslator3Activeresource>translator4<handleBoxTranslator4resource>translator4Active<handleBoxTranslator4Activeresource>translator5<handleBoxTranslator5resource>translator5Active<handleBoxTranslator5Activeresource>translator6<handleBoxTranslator6resource>translator6Active<handleBoxTranslator6Activeresource>extruder1<handleBoxExtruder1resource>extruder1Active<handleBoxExtruder1Activeresource>extruder2<handleBoxExtruder2resource>extruder2Active<handleBoxExtruder2Activeresource>extruder3<handleBoxExtruder3resource>extruder3Active<handleBoxExtruder3Activeresource>extruder4<handleBoxExtruder4resource>extruder4Active<handleBoxExtruder4Activeresource>extruder5<handleBoxExtruder5resource>extruder5Active<handleBoxExtruder5Activeresource>extruder6<handleBoxExtruder6resource>extruder6Active<handleBoxExtruder6Activeresource>uniform1<handleBoxUniform1resource>uniform1Active<handleBoxUniform1Activeresource>uniform2<handleBoxUniform2resource>uniform2Active<handleBoxUniform2Activeresource>uniform3<handleBoxUniform3resource>uniform3Active<handleBoxUniform3Activeresource>uniform4<handleBoxUniform4resource>uniform4Active<handleBoxUniform4Activeresource>uniform5<handleBoxUniform5resource>uniform5Active<handleBoxUniform5Activeresource>uniform6<handleBoxUniform6resource>uniform6Active<handleBoxUniform6Activeresource>uniform7<handleBoxUniform7resource>uniform7Active<handleBoxUniform7Activeresource>uniform8<handleBoxUniform8resource>uniform8Active<handleBoxUniform8Activeresource>arrow1<handleBoxArrow1resource>arrow2<handleBoxArrow2resource>arrow3<handleBoxArrow3resource>arrow4<handleBoxArrow4resource>arrow5<handleBoxArrow5resource>arrow6<handleBoxArrow6resource>}

Inherits From

       SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoHandleBoxDragger

Methods

SoHandleBoxDragger()
          Constructor.

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

     staticSoTypegetClassTypeId()
          Returns type identifier for this class.

Name

       SoHandleBoxDragger — box you can scale, stretch and translate by dragging with the mouse

Note

       Unlike most multi-function draggers, SoHandleBoxDragger is not  a  compound  dragger  made  up  of  other
       draggers  that  perform  its  smaller  tasks.  This  is not because it was inappropriate, but because was
       written before implementation of the methods  that  synchronize  multiple  child  draggers.  The  younger
       SoTransformBoxDragger  has  similarities  to  the  handle box dragger, but the transform box dragger is a
       compound dragger.

See Also

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

Synopsis

#include<Inventor/draggers/SoHandleBoxDragger.h>

          Fields from class SoHandleBoxDragger:

     SoSFVec3fscaleFactorSoSFVec3ftranslation

          Fields from class SoDragger:

     SoSFBoolisActive

          Fields from class SoInteractionKit:

     SoSFEnumrenderCachingSoSFEnumboundingBoxCachingSoSFEnumrenderCullingSoSFEnumpickCulling

          Parts from class SoBaseKit:

     (SoNodeKitListPart)callbackList

          Methods from class SoHandleBoxDragger:

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