SoHandleBoxDragger(3IV)NAMESoHandleBoxDragger (SoHBoxDrag) - box you can scale, stretch and
translate by dragging with the mouse
INHERITS FROM
SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit >
SoDragger > SoHandleBoxDraggerSYNOPSIS
#include <Inventor_c/draggers/SoHandleBoxDragger.h>
typedef SoHandleBoxDragger SoHBoxDrag
Fields from class SoHandleBoxDragger:
SoSFVec3f scaleFactor
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
Functions from class SoHandleBoxDragger:
SoHandleBoxDragger * SoHBoxDragCreate()
const SoNodekitCatalog * SoHBoxDragGetClassNkitCat()
SoType SoHBoxDragGetClassTypeId()
Functions from class SoDragger:
void SoHBoxDragAddStartCB(SoHBoxDrag *this, SoDraggerCB
*f, void *userData = NULL)
void SoHBoxDragRemoveStartCB(SoHBoxDrag *this, SoDraggerCB
*f, void *userData = NULL)
void SoHBoxDragAddMotionCB(SoHBoxDrag *this, SoDraggerCB
*f, void *userData = NULL)
void SoHBoxDragRemoveMotionCB(SoHBoxDrag *this,
SoDraggerCB *f, void *userData = NULL)
void SoHBoxDragAddFinishCB(SoHBoxDrag *this, SoDraggerCB
*f, void *userData = NULL)
Page 1SoHandleBoxDragger(3IV)
void SoHBoxDragRemoveFinishCB(SoHBoxDrag *this,
SoDraggerCB *f, void *userData = NULL)
void SoHBoxDragAddValueChangedCB(SoHBoxDrag *this,
SoDraggerCB *f, void *userData = NULL)
void SoHBoxDragRemoveValueChangedCB(SoHBoxDrag *this,
SoDraggerCB *f, void *userData = NULL)
SbBool SoHBoxDragEnableValueChangedCBs(SoHBoxDrag *this)
void SoHBoxDragSetMinGesture(SoHBoxDrag *this, int pixels)
int SoHBoxDragGetMinGesture(const SoHBoxDrag *this)
void SoHBoxDragSetMinScale(float newMinScale)
float SoHBoxDragGetMinScale()
Functions from class SoInteractionKit:
SbBool SoHBoxDragSetPartAsPath(SoHBoxDrag *this, const char
*partName, SoPath *surrogatePath )
Functions from class SoBaseKit:
const SoNodekitCatalog * SoHBoxDragGetCat(const SoHBoxDrag *this)
SoNode * SoHBoxDragGetPart(SoHBoxDrag *this, const char
*partName, SbBool makeIfNeeded)
SbString SoHBoxDragGetPartString(SoHBoxDrag *this, const
SoBase *part)
SoNodeKitPath * SoHBoxDragCreatePathToPart(SoHBoxDrag *this,
const char *partName, SbBool makeIfNeeded,
const SoPath *pathToExtend = NULL)
SbBool SoHBoxDragSetPart(SoHBoxDrag *this, const char
*partName, SoNode *newPart)
SbBool SoHBoxDragSet(SoHBoxDrag *this, char *partName,
char *parameters)
SbBool SoHBoxDragSet2(SoHBoxDrag *this, char
*nameValuePairs)
SbBool SoHBoxDragIsSearchingChildren()
void SoHBoxDragSetSearchingChildren(SbBool newVal)
Functions from class SoNode:
void SoHBoxDragSetOverride(SoHBoxDrag *this, SbBool state)
SbBool SoHBoxDragIsOverride(const SoHBoxDrag *this)
SoNode * SoHBoxDragCopy(const SoHBoxDrag *this, SbBool
copyConnections = FALSE)
SbBool SoHBoxDragAffectsState(const SoHBoxDrag *this)
SoNode * SoHBoxDragGetByName(const char *name)
int SoHBoxDragGetByNameList(const char *name, SoNodeList
*list)
Functions from class SoFieldContainer:
void SoHBoxDragSetToDflts(SoHBoxDrag *this)
SbBool SoHBoxDragHasDfltVals(const SoHBoxDrag *this)
Page 2SoHandleBoxDragger(3IV)
SbBool SoHBoxDragFldsAreEq(const SoHBoxDrag *this, const
SoFieldContainer *fc)
void SoHBoxDragCopyFieldVals(SoHBoxDrag *this, const
SoFieldContainer *fc, SbBool copyConnections =
FALSE)
void SoHBoxDragGet(SoHBoxDrag *this, SbString
*fieldDataString)
int SoHBoxDragGetFields(const SoHBoxDrag *this,
SoFieldList *resultList)
SoField * SoHBoxDragGetField(const SoHBoxDrag *this, const char
*fieldName)
SbBool SoHBoxDragGetFieldName(const SoHBoxDrag *this, const
SoField *field, SbName *fieldName)
SbBool SoHBoxDragIsNotifyEnabled(const SoHBoxDrag *this)
SbBool SoHBoxDragEnableNotify(SoHBoxDrag *this, SbBool flag)
Functions from class SoBase:
void SoHBoxDragRef(SoHBoxDrag *this)
void SoHBoxDragUnref(const SoHBoxDrag *this)
void SoHBoxDragUnrefNoDelete(const SoHBoxDrag *this)
void SoHBoxDragTouch(SoHBoxDrag *this)
SoType SoHBoxDragGetTypeId(const SoHBoxDrag *this)
SbBool SoHBoxDragIsOfType(const SoHBoxDrag *this, SoType
type)
void SoHBoxDragSetName(SoHBoxDrag *this, const char *name)
SbName SoHBoxDragGetName(const SoHBoxDrag *this)
DESCRIPTIONSoHandleBoxDragger is a dragger shaped like a wireframe box with small
corner cubes mounted on each corner. Click and drag any of these cubes to
scale the box uniformly. Six other center cubes 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 feedback arrows 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.
Page 3SoHandleBoxDragger(3IV)
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
SoDraggerSetPart(). 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.
FIELDS
SoSFVec3f scaleFactor
Scale of the dragger.
SoSFVec3f translation
Position of the dragger.
FUNCTIONSSoHandleBoxDragger * SoHBoxDragCreate()
Constructor.
const SoNodekitCatalog * SoHBoxDragGetClassNkitCat()
Returns an SoNodekitCatalog for this class
SoType SoHBoxDragGetClassTypeId()
Returns type identifier for this class.
CATALOG PARTSPage 4SoHandleBoxDragger(3IV)Page 5SoHandleBoxDragger(3IV)
______________________________________________________________
All parts
NULL by
Part Name Part Type Default Type Default
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
______________________________________________________________
|
|
Page 6SoHandleBoxDragger(3IV)
arrow5 Separator -- yes
arrow6 Separator -- yes
______________________________________________________________
|
|
________________________________________________________________
Extra information for list parts from above table
Part Name Container Type Permissible Types
Callback, EventCallback
callbackList Separator
________________________________________________________________
|
|
DRAGGER RESOURCES
Resource: handleBoxTranslator1
Part: translator1
Appearance: White Line-Style Square
Description: Top face of handleBox. Picking this initiates scaling
in x-z plane.
Resource: handleBoxTranslator2
Part: translator2
Appearance: White Line-Style Square
Description: Bottom face of handleBox. Picking this initiates
scaling in x-z plane.
Resource: handleBoxTranslator3
Part: translator3
Appearance: White Line-Style Square
Description: Left face of handleBox. Picking this initiates scaling
in y-z plane.
Resource: handleBoxTranslator4
Part: translator4
Appearance: White Line-Style Square
Description: Right face of handleBox. Picking this initiates scaling
in y-z plane.
Resource: handleBoxTranslator5
Part: translator5
Appearance: White Line-Style Square
Description: Front face of handleBox. Picking this initiates scaling
in x-y plane.
Resource: handleBoxTranslator6
Part: translator6
Appearance: White Line-Style Square
Description: Back face of handleBox. Picking this initiates scaling
in x-y plane.
Resource: handleBoxTranslator1Active
Part: translator1Active
Appearance: Yellow version of handleBoxTranslator1
Description: Replaces handleBoxTranslator1 during dragging.
Page 7SoHandleBoxDragger(3IV)
Resource: handleBoxTranslator2Active
Part: translator2Active
Appearance: Yellow version of handleBoxTranslator2
Description: Replaces handleBoxTranslator2 during dragging.
Resource: handleBoxTranslator3Active
Part: translator3Active
Appearance: Yellow version of handleBoxTranslator3
Description: Replaces handleBoxTranslator3 during dragging.
Resource: handleBoxTranslator4Active
Part: translator4Active
Appearance: Yellow version of handleBoxTranslator4
Description: Replaces handleBoxTranslator4 during dragging.
Resource: handleBoxTranslator5Active
Part: translator5Active
Appearance: Yellow version of handleBoxTranslator5
Description: Replaces handleBoxTranslator5 during dragging.
Resource: handleBoxTranslator6Active
Part: translator6Active
Appearance: Yellow version of handleBoxTranslator6
Description: Replaces handleBoxTranslator6 during dragging.
Resource: handleBoxExtruder1
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.
Resource: handleBoxExtruder2
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.
Resource: handleBoxExtruder3
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.
Resource: handleBoxExtruder4
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.
Resource: handleBoxExtruder5
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.
Resource: handleBoxExtruder6
Part: extruder6
Page 8SoHandleBoxDragger(3IV)
Appearance: Small white cube at (0,0,-1.25) with line to origin
Description: Selecting this part initiates 1-D scaling along Z axis.
Resource: handleBoxExtruder1Active
Part: extruder1Active
Appearance: Yellow version of handleBoxExtruder1
Description: Replaces handleBoxExtruder1 during dragging.
Resource: handleBoxExtruder2Active
Part: extruder2Active
Appearance: Yellow version of handleBoxExtruder1
Description: Replaces handleBoxExtruder1 during dragging.
Resource: handleBoxExtruder3Active
Part: extruder3Active
Appearance: Yellow version of handleBoxExtruder3
Description: Replaces handleBoxExtruder3 during dragging.
Resource: handleBoxExtruder4Active
Part: extruder4Active
Appearance: Yellow version of handleBoxExtruder4
Description: Replaces handleBoxExtruder4 during dragging.
Resource: handleBoxExtruder5Active
Part: extruder5Active
Appearance: Yellow version of handleBoxExtruder5
Description: Replaces handleBoxExtruder5 during dragging.
Resource: handleBoxExtruder6Active
Part: extruder6Active
Appearance: Yellow version of handleBoxExtruder6
Description: Replaces handleBoxExtruder6 during dragging.
Resource: handleBoxUniform1
Part: uniform1
Appearance: Small white cube in (+x+y+z) corner of handleBox
Description: Picking this initiates uniform scaling.
Resource: handleBoxUniform2
Part: uniform2
Appearance: Small white cube in (+x+y-z) corner of handleBox
Description: Picking this initiates uniform scaling.
Resource: handleBoxUniform3
Part: uniform3
Appearance: Small white cube in (+x-y+z) corner of handleBox
Description: Picking this initiates uniform scaling.
Resource: handleBoxUniform4
Part: uniform4
Appearance: Small white cube in (+x-y-z) corner of handleBox
Description: Picking this initiates uniform scaling.
Page 9SoHandleBoxDragger(3IV)
Resource: handleBoxUniform5
Part: uniform5
Appearance: Small white cube in (-x+y+z) corner of handleBox
Description: Picking this initiates uniform scaling.
Resource: handleBoxUniform6
Part: uniform6
Appearance: Small white cube in (-x+y-z) corner of handleBox
Description: Picking this initiates uniform scaling.
Resource: handleBoxUniform7
Part: uniform7
Appearance: Small white cube in (-x-y+z) corner of handleBox
Description: Picking this initiates uniform scaling.
Resource: handleBoxUniform8
Part: uniform8
Appearance: Small white cube in (-x-y-z) corner of handleBox
Description: Picking this initiates uniform scaling.
Resource: handleBoxUniform1Active
Part: uniform1Active
Appearance: Yellow version of handleBoxUniform1Active
Description: Replaces handleBoxUniform1Active during dragging.
Resource: handleBoxUniform2Active
Part: uniform2Active
Appearance: Yellow version of handleBoxUniform1Active
Description: Replaces handleBoxUniform1Active during dragging.
Resource: handleBoxUniform3Active
Part: uniform3Active
Appearance: Yellow version of handleBoxUniform1Active
Description: Replaces handleBoxUniform1Active during dragging.
Resource: handleBoxUniform4Active
Part: uniform4Active
Appearance: Yellow version of handleBoxUniform1Active
Description: Replaces handleBoxUniform1Active during dragging.
Resource: handleBoxUniform5Active
Part: uniform5Active
Appearance: Yellow version of handleBoxUniform1Active
Description: Replaces handleBoxUniform1Active during dragging.
Resource: handleBoxUniform6Active
Part: uniform6Active
Appearance: Yellow version of handleBoxUniform1Active
Description: Replaces handleBoxUniform1Active during dragging.
Resource: handleBoxUniform7Active
Part: uniform7Active
Page 10SoHandleBoxDragger(3IV)
Appearance: Yellow version of handleBoxUniform1Active
Description: Replaces handleBoxUniform1Active during dragging.
Resource: handleBoxUniform8Active
Part: uniform8Active
Appearance: Yellow version of handleBoxUniform1Active
Description: Replaces handleBoxUniform1Active during dragging.
Resource: handleBoxArrow1
Part: arrow1
Appearance: Purple Arrow, pointing up
Description: Displayed when translating if Y direction is permitted.
Resource: handleBoxArrow2
Part: arrow2
Appearance: Purple Arrow, pointing down
Description: Displayed when translating if Y direction is permitted.
Resource: handleBoxArrow3
Part: arrow3
Appearance: Purple Arrow, pointing left
Description: Displayed when translating if X direction is permitted.
Resource: handleBoxArrow4
Part: arrow4
Appearance: Purple Arrow, pointing right
Description: Displayed when translating if X direction is permitted.
Resource: handleBoxArrow5
Part: arrow5
Appearance: Purple Arrow, pointing forward
Description: Displayed when translating if Z direction is permitted.
Resource: handleBoxArrow6
Part: arrow6
Appearance: Purple Arrow, pointing backward
Description: Displayed when translating if Z direction is permitted.
FILE FORMAT/DEFAULTS
HandleBoxDragger {
renderCaching AUTO
boundingBoxCaching AUTO
renderCulling AUTO
pickCulling AUTO
isActive FALSE
translation 0 0 0
scaleFactor 1 1 1
callbackList NULL
surroundScale NULL
translator1 <handleBoxTranslator1 resource>
translator1Active <handleBoxTranslator1Active resource>
Page 11SoHandleBoxDragger(3IV)
translator2 <handleBoxTranslator2 resource>
translator2Active <handleBoxTranslator2Active resource>
translator3 <handleBoxTranslator3 resource>
translator3Active <handleBoxTranslator3Active resource>
translator4 <handleBoxTranslator4 resource>
translator4Active <handleBoxTranslator4Active resource>
translator5 <handleBoxTranslator5 resource>
translator5Active <handleBoxTranslator5Active resource>
translator6 <handleBoxTranslator6 resource>
translator6Active <handleBoxTranslator6Active resource>
extruder1 <handleBoxExtruder1 resource>
extruder1Active <handleBoxExtruder1Active resource>
extruder2 <handleBoxExtruder2 resource>
extruder2Active <handleBoxExtruder2Active resource>
extruder3 <handleBoxExtruder3 resource>
extruder3Active <handleBoxExtruder3Active resource>
extruder4 <handleBoxExtruder4 resource>
extruder4Active <handleBoxExtruder4Active resource>
extruder5 <handleBoxExtruder5 resource>
extruder5Active <handleBoxExtruder5Active resource>
extruder6 <handleBoxExtruder6 resource>
extruder6Active <handleBoxExtruder6Active resource>
uniform1 <handleBoxUniform1 resource>
uniform1Active <handleBoxUniform1Active resource>
uniform2 <handleBoxUniform2 resource>
uniform2Active <handleBoxUniform2Active resource>
uniform3 <handleBoxUniform3 resource>
uniform3Active <handleBoxUniform3Active resource>
uniform4 <handleBoxUniform4 resource>
uniform4Active <handleBoxUniform4Active resource>
uniform5 <handleBoxUniform5 resource>
uniform5Active <handleBoxUniform5Active resource>
uniform6 <handleBoxUniform6 resource>
uniform6Active <handleBoxUniform6Active resource>
uniform7 <handleBoxUniform7 resource>
uniform7Active <handleBoxUniform7Active resource>
uniform8 <handleBoxUniform8 resource>
uniform8Active <handleBoxUniform8Active resource>
arrow1 <handleBoxArrow1 resource>
arrow2 <handleBoxArrow2 resource>
arrow3 <handleBoxArrow3 resource>
arrow4 <handleBoxArrow4 resource>
arrow5 <handleBoxArrow5 resource>
arrow6 <handleBoxArrow6 resource>
}
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
Page 12SoHandleBoxDragger(3IV)
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,
SoTranslate2Dragger
Page 13