SoTabPlaneDragger(3IV)NAMESoTabPlaneDragger (SoTabPlnDrag) - object you can translate or scale
within a plane by dragging with the mouse
INHERITS FROM
SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit >
SoDragger > SoTabPlaneDraggerSYNOPSIS
#include <Inventor_c/draggers/SoTabPlaneDragger.h>
typedef SoTabPlaneDragger SoTabPlnDrag
Fields from class SoTabPlaneDragger:
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 SoTabPlaneDragger:
SoTabPlaneDragger * SoTabPlnDragCreate()
void SoTabPlnDragAdjustScaleTabSize(SoTabPlnDrag
*this)
const SoNodekitCatalog * SoTabPlnDragGetClassNkitCat()
SoType SoTabPlnDragGetClassTypeId()
Functions from class SoDragger:
void SoTabPlnDragAddStartCB(SoTabPlnDrag *this,
SoDraggerCB *f, void *userData = NULL)
void SoTabPlnDragRemoveStartCB(SoTabPlnDrag *this,
SoDraggerCB *f, void *userData = NULL)
void SoTabPlnDragAddMotionCB(SoTabPlnDrag *this,
SoDraggerCB *f, void *userData = NULL)
void SoTabPlnDragRemoveMotionCB(SoTabPlnDrag *this,
SoDraggerCB *f, void *userData = NULL)
Page 1SoTabPlaneDragger(3IV)
void SoTabPlnDragAddFinishCB(SoTabPlnDrag *this,
SoDraggerCB *f, void *userData = NULL)
void SoTabPlnDragRemoveFinishCB(SoTabPlnDrag *this,
SoDraggerCB *f, void *userData = NULL)
void SoTabPlnDragAddValueChangedCB(SoTabPlnDrag *this,
SoDraggerCB *f, void *userData = NULL)
void SoTabPlnDragRemoveValueChangedCB(SoTabPlnDrag *this,
SoDraggerCB *f, void *userData = NULL)
SbBool SoTabPlnDragEnableValueChangedCBs(SoTabPlnDrag *this)
void SoTabPlnDragSetMinGesture(SoTabPlnDrag *this, int
pixels)
int SoTabPlnDragGetMinGesture(const SoTabPlnDrag *this)
void SoTabPlnDragSetMinScale(float newMinScale)
float SoTabPlnDragGetMinScale()
Functions from class SoInteractionKit:
SbBool SoTabPlnDragSetPartAsPath(SoTabPlnDrag *this, const
char *partName, SoPath *surrogatePath )
Functions from class SoBaseKit:
const SoNodekitCatalog * SoTabPlnDragGetCat(const SoTabPlnDrag *this)
SoNode * SoTabPlnDragGetPart(SoTabPlnDrag *this, const
char *partName, SbBool makeIfNeeded)
SbString SoTabPlnDragGetPartString(SoTabPlnDrag *this,
const SoBase *part)
SoNodeKitPath * SoTabPlnDragCreatePathToPart(SoTabPlnDrag
*this, const char *partName, SbBool
makeIfNeeded, const SoPath *pathToExtend =
NULL)
SbBool SoTabPlnDragSetPart(SoTabPlnDrag *this, const
char *partName, SoNode *newPart)
SbBool SoTabPlnDragSet(SoTabPlnDrag *this, char
*partName, char *parameters)
SbBool SoTabPlnDragSet2(SoTabPlnDrag *this, char
*nameValuePairs)
SbBool SoTabPlnDragIsSearchingChildren()
void SoTabPlnDragSetSearchingChildren(SbBool newVal)
Functions from class SoNode:
void SoTabPlnDragSetOverride(SoTabPlnDrag *this, SbBool
state)
SbBool SoTabPlnDragIsOverride(const SoTabPlnDrag *this)
SoNode * SoTabPlnDragCopy(const SoTabPlnDrag *this, SbBool
copyConnections = FALSE)
SbBool SoTabPlnDragAffectsState(const SoTabPlnDrag *this)
SoNode * SoTabPlnDragGetByName(const char *name)
int SoTabPlnDragGetByNameList(const char *name,
SoNodeList *list)
Page 2SoTabPlaneDragger(3IV)
Functions from class SoFieldContainer:
void SoTabPlnDragSetToDflts(SoTabPlnDrag *this)
SbBool SoTabPlnDragHasDfltVals(const SoTabPlnDrag *this)
SbBool SoTabPlnDragFldsAreEq(const SoTabPlnDrag *this, const
SoFieldContainer *fc)
void SoTabPlnDragCopyFieldVals(SoTabPlnDrag *this, const
SoFieldContainer *fc, SbBool copyConnections =
FALSE)
void SoTabPlnDragGet(SoTabPlnDrag *this, SbString
*fieldDataString)
int SoTabPlnDragGetFields(const SoTabPlnDrag *this,
SoFieldList *resultList)
SoField * SoTabPlnDragGetField(const SoTabPlnDrag *this, const
char *fieldName)
SbBool SoTabPlnDragGetFieldName(const SoTabPlnDrag *this,
const SoField *field, SbName *fieldName)
SbBool SoTabPlnDragIsNotifyEnabled(const SoTabPlnDrag *this)
SbBool SoTabPlnDragEnableNotify(SoTabPlnDrag *this, SbBool
flag)
Functions from class SoBase:
void SoTabPlnDragRef(SoTabPlnDrag *this)
void SoTabPlnDragUnref(const SoTabPlnDrag *this)
void SoTabPlnDragUnrefNoDelete(const SoTabPlnDrag *this)
void SoTabPlnDragTouch(SoTabPlnDrag *this)
SoType SoTabPlnDragGetTypeId(const SoTabPlnDrag *this)
SbBool SoTabPlnDragIsOfType(const SoTabPlnDrag *this, SoType
type)
void SoTabPlnDragSetName(SoTabPlnDrag *this, const char
*name)
SbName SoTabPlnDragGetName(const SoTabPlnDrag *this)
DESCRIPTIONSoTabPlaneDragger is a dragger which allows the user to interactively
translate and scale in a plane. It looks like a square white outline with
smaller green squares (or tabs) set in the corners and along the center
of each edge. Dragging a corner tab scales the dragger in 2D by scaling
about the opposite corner. Dragging an edge tab performs 1D scaling about
the opposite edge. The rest of the dragger is invisible but pickable;
selecting it initiates translation within the plane.
The dragger tries to keep the small tabs a constant size in screen space.
Every time a drag begins or ends, the size is recalculated based on the
viewing and modeling matrix.
When dragging the translator part, press the <Shift> key and you can
constrain motion to either the local x axis or the y axis. The direction
is determined by your initial mouse gesture after pressing the key.
Releasing the key removes the constraint.
Page 3SoTabPlaneDragger(3IV)
When the translator part drags, the dragger updates its translation
field. The various scaling parts cause changes to both the scaleFactor
and translation field, since scaling about a point other than the center
adds translation to the center of the dragger. If you set the field, the
dragger will move accordingly. You can also connect fields of other nodes
or engines from this one to make them follow the dragger's motion.
You can not change the shape used to draw the tabs. This part is kept
privately and may not be changed; the coordinates for the tabs are edited
during SoTabPlnDrag::adjustScaleTabSize().
The SoTabPlaneDragger class does contain three other parts you can
change: tabPlaneTranslator, tabPlaneScaleTabMaterial and
tabPlaneScaleTabHints.
Each of these is set by default from a resource described in the Dragger
Resources section of the online reference page for this class. You can
change the parts in any instance of this dragger using
SoDraggerSetPart().
You can make your program use different default resources for the parts
by copying the file /usr/share/data/draggerDefaults/tabPlaneDragger.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 factor affecting the dragger.
SoSFVec3f translation
Position of the dragger.
FUNCTIONSSoTabPlaneDragger * SoTabPlnDragCreate()
Constructor.
void SoTabPlnDragAdjustScaleTabSize(SoTabPlnDrag
*this)
Cause the scale tab sizes to be re-adjusted so that they remain a
near constant screen space size. This happens automatically upon
dragger finish. Call this to adjust the scale tab sizes at other
times, for instance after the camera has changed in a viewer finish
callback.
const SoNodekitCatalog * SoTabPlnDragGetClassNkitCat()
Returns an SoNodekitCatalog for this class
SoType SoTabPlnDragGetClassTypeId()
Returns type identifier for this class.
Page 4SoTabPlaneDragger(3IV)CATALOG PARTS
_____________________________________________________________
All parts
NULL by
Part Name Part Type Default Type Default
callbackList NodeKitListPart -- yes
translator Separator -- yes
scaleTabMaterial Material -- yes
scaleTabHints ShapeHints -- yes
_____________________________________________________________
|
|
________________________________________________________________
Extra information for list parts from above table
Part Name Container Type Permissible Types
Callback, EventCallback
callbackList Separator
________________________________________________________________
|
|
DRAGGER RESOURCES
Resource: tabPlaneTranslator
Part: translator
Appearance: Outline of a Square. The region within it is pickable
Description: Begins translation within the plane
Resource: tabPlaneScaleTabMaterial
Part: scaleTabMaterial
Appearance: Green - half diffuse, half emissive.
Description: Used as material for scaling tabs.
Resource: tabPlaneScaleTabHints
Part: scaleTabHints
Appearance: shapeHints node:COUNTERCLOCKWISE/SOLID/CONVEX
Description: Property for the tab nodes.
FILE FORMAT/DEFAULTS
TabPlaneDragger {
renderCaching AUTO
boundingBoxCaching AUTO
renderCulling AUTO
pickCulling AUTO
isActive FALSE
translation 0 0 0
scaleFactor 1 1 1
callbackList NULL
translator <tabPlaneTranslator resource>
scaleTabMaterial <tabPlaneScaleTabMaterial resource>
scaleTabHints <tabPlaneScaleTabHints resource>
}
Page 5SoTabPlaneDragger(3IV)SEE ALSO
SoInteractionKit, SoDragger, SoCenterballDragger,
SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger,
SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger,
SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger,
SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger,
SoSpotLightDragger, SoTabBoxDragger, SoTrackballDragger,
SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger,
SoTranslate2Dragger
Page 6