SmallChange
1.0.0
A collection of extensions to Coin3D
|
The SoAngle1Dragger class is for rotating geometry around a single axis. More...
#include <Smallchange/draggers>
Public Member Functions | |
SoAngle1Dragger (void) | |
const SbCylinderProjector * | getProjector (void) const |
void | setProjector (SbCylinderProjector *p) |
Static Public Member Functions | |
static void | initClass (void) |
Public Attributes | |
SoSFFloat | angle |
Protected Member Functions | |
~SoAngle1Dragger () | |
virtual void | copyContents (const SoFieldContainer *fromfc, SbBool copyconnections) |
void | drag (void) |
void | dragFinish (void) |
void | dragStart (void) |
virtual SbBool | setUpConnections (SbBool onoff, SbBool doitalways=FALSE) |
Static Protected Member Functions | |
static void | doneCB (void *f, SoDragger *d) |
static void | motionCB (void *f, SoDragger *d) |
static void | startCB (void *f, SoDragger *d) |
The SoAngle1Dragger class is for rotating geometry around a single axis.
Use an instance of this dragger class in your scene graph to let the end-users of your application rotate geometry around a predefined axis vector in 3D.
For the dragger orientation and positioning itself, use some kind of transformation node in your scene graph, as usual.
This class offers a field angle, given in radians. This field holds the current angle, as not normalized value. In other words, it holds the number of rotations the dragger has done.
SoAngle1Dragger::SoAngle1Dragger | ( | void | ) |
Default constructor, sets up the dragger nodekit catalog with the interaction geometry.
|
protected |
Protected destructor.
(Dragger classes are derived from SoBase, so they are reference counted and automatically destroyed when their reference count goes to 0.)
const SbCylinderProjector * SoAngle1Dragger::getProjector | ( | void | ) | const |
Returns projector instance used for converting from user interaction dragger movements to 3D dragger reorientation.
void SoAngle1Dragger::setProjector | ( | SbCylinderProjector * | p | ) |
Replace the default cylinder projection strategy. You may want to do this if you change the dragger geometry, for instance.
The default cylinder projection is an SbCylinderPlaneProjector.
SoSFRotation SoAngle1Dragger::angle |
This field is continuously updated to contain the angle (in radians) of the current direction vector of the dragger.
The application programmer using this dragger in his scene graph should connect the relevant node fields in the scene to this field to make them follow the dragger orientation.
The angle holds a not normalized value. In other words, it holds the number of rotations the dragger has done, in addition to the orientation.