SmallChange  1.0.0
A collection of extensions to Coin3D
Loading...
Searching...
No Matches
SoAngle1Dragger Class Reference

The SoAngle1Dragger class is for rotating geometry around a single axis. More...

#include <Smallchange/draggers>

Inheritance diagram for SoAngle1Dragger:
SoDragger

Public Member Functions

 SoAngle1Dragger (void)
 
const SbCylinderProjectorgetProjector (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)
 

Detailed Description

The SoAngle1Dragger class is for rotating geometry around a single axis.

/ SoAngle1Dragger.h

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.

Constructor & Destructor Documentation

◆ SoAngle1Dragger()

SoAngle1Dragger::SoAngle1Dragger ( void )

Default constructor, sets up the dragger nodekit catalog with the interaction geometry.

◆ ~SoAngle1Dragger()

SoAngle1Dragger::~SoAngle1Dragger ( )
protected

Protected destructor.

(Dragger classes are derived from SoBase, so they are reference counted and automatically destroyed when their reference count goes to 0.)

Member Function Documentation

◆ getProjector()

const SbCylinderProjector * SoAngle1Dragger::getProjector ( void ) const

Returns projector instance used for converting from user interaction dragger movements to 3D dragger reorientation.

See also
setProjector()

◆ setProjector()

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.

See also
SbCylinderSectionProjector, SbCylinderSheetProjector

Member Data Documentation

◆ angle

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.


The documentation for this class was generated from the following files: