Coin Logo http://www.sim.no
http://www.coin3d.org

SoVRMLDragSensor Class Reference

The SoVRMLDragSensor class is a superclass for VRML drag sensors. More...

#include <Inventor/VRMLnodes/SoVRMLDragSensor.h>

Inheritance diagram for SoVRMLDragSensor:

SoVRMLSensor SoNode SoFieldContainer SoBase SoVRMLCylinderSensor SoVRMLPlaneSensor SoVRMLSphereSensor

List of all members.

Public Member Functions

virtual SoType getTypeId (void) const
virtual void handleEvent (SoHandleEventAction *action)

Static Public Member Functions

static SoType getClassTypeId (void)
static void initClass (void)

Public Attributes

SoSFVec3f trackPoint_changed
SoSFBool autoOffset

Protected Member Functions

virtual const SoFieldDatagetFieldData (void) const
virtual SbBool dragStart (void)=0
virtual void drag (void)=0
virtual void dragFinish (void)=0
 SoVRMLDragSensor (void)
virtual ~SoVRMLDragSensor ()
const SbVec3fgetLocalStartingPoint (void) const
const SbMatrixgetLocalToWorldMatrix (void) const
const SbMatrixgetWorldToLocalMatrix (void) const
const SbViewVolumegetViewVolume (void) const
const SbVec2fgetNormalizedLocaterPosition (void) const

Static Protected Member Functions

static const SoFieldData ** getFieldDataPtr (void)


Detailed Description

The SoVRMLDragSensor class is a superclass for VRML drag sensors.

This class collects the two fields that are common for some of the sensor nodes, plus some common functions for these. Since this is an abstract "helper" class, it does not represent an actual node from the VRML97 specification, so don't use it as such.

For more information, a detailed discussion of drag sensors is available in section 4.6.7.4 of the VRML97 specification:

<http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.6.7.4>.


Constructor & Destructor Documentation

SoVRMLDragSensor::SoVRMLDragSensor ( void   )  [protected]

Constructor.

References autoOffset, and trackPoint_changed.

SoVRMLDragSensor::~SoVRMLDragSensor (  )  [protected, virtual]

Destructor.


Member Function Documentation

SoType SoVRMLDragSensor::getClassTypeId ( void   )  [static]

This static method returns the SoType object associated with objects of this class.

Reimplemented from SoVRMLSensor.

Reimplemented in SoVRMLCylinderSensor, SoVRMLPlaneSensor, and SoVRMLSphereSensor.

SoType SoVRMLDragSensor::getTypeId ( void   )  const [virtual]

Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and "downward" casting.

Usage example:

  void foo(SoNode * node)
  {
    if (node->getTypeId() == SoFile::getClassTypeId()) {
      SoFile * filenode = (SoFile *)node;  // safe downward cast, knows the type
    }
    else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
      SoGroup * group = (SoGroup *)node;  // safe downward cast, knows the type
    }
  }

For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on.

For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.

Reimplemented from SoVRMLSensor.

Reimplemented in SoVRMLCylinderSensor, SoVRMLPlaneSensor, and SoVRMLSphereSensor.

const SoFieldData ** SoVRMLDragSensor::getFieldDataPtr ( void   )  [static, protected]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Reimplemented from SoVRMLSensor.

Reimplemented in SoVRMLCylinderSensor, SoVRMLPlaneSensor, and SoVRMLSphereSensor.

const SoFieldData * SoVRMLDragSensor::getFieldData ( void   )  const [protected, virtual]

Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.

Reimplemented from SoVRMLSensor.

Reimplemented in SoVRMLCylinderSensor, SoVRMLPlaneSensor, and SoVRMLSphereSensor.

void SoVRMLDragSensor::handleEvent ( SoHandleEventAction action  )  [virtual]

void SoVRMLDragSensor::initClass ( void   )  [static]

Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.

Reimplemented from SoVRMLSensor.

Reimplemented in SoVRMLCylinderSensor, SoVRMLPlaneSensor, and SoVRMLSphereSensor.

SbBool SoVRMLDragSensor::dragStart ( void   )  [protected, pure virtual]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Called when dragger is selected (picked) by the user.

Implemented in SoVRMLCylinderSensor, SoVRMLPlaneSensor, and SoVRMLSphereSensor.

Referenced by handleEvent().

void SoVRMLDragSensor::drag ( void   )  [protected, pure virtual]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Called when user drags the mouse after picking the dragger.

Implemented in SoVRMLCylinderSensor, SoVRMLPlaneSensor, and SoVRMLSphereSensor.

Referenced by handleEvent().

void SoVRMLDragSensor::dragFinish ( void   )  [protected, pure virtual]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Called when mouse button is released after picking and interacting with the dragger.

Implemented in SoVRMLCylinderSensor, SoVRMLPlaneSensor, and SoVRMLSphereSensor.

Referenced by handleEvent().

const SbVec3f & SoVRMLDragSensor::getLocalStartingPoint ( void   )  const [protected]

const SbMatrix & SoVRMLDragSensor::getLocalToWorldMatrix ( void   )  const [protected]

Returns the matrix that transforms to the world coordinate system.

Referenced by SoVRMLSphereSensor::drag(), SoVRMLPlaneSensor::drag(), SoVRMLCylinderSensor::drag(), and SoVRMLSphereSensor::dragStart().

const SbMatrix & SoVRMLDragSensor::getWorldToLocalMatrix ( void   )  const [protected]

Returns the matrix that transforms from the world coordinate system.

Referenced by SoVRMLSphereSensor::drag().

const SbViewVolume & SoVRMLDragSensor::getViewVolume ( void   )  const [protected]

const SbVec2f & SoVRMLDragSensor::getNormalizedLocaterPosition ( void   )  const [protected]

Returns the current normalized pointer position.

Referenced by SoVRMLSphereSensor::drag(), SoVRMLPlaneSensor::drag(), and SoVRMLCylinderSensor::drag().


Member Data Documentation

An event out that is generated when the trackpoint is changed.

Referenced by SoVRMLDragSensor().

When TRUE, the offset field is updated when a dragging sequence is finished. Default value is TRUE.

Referenced by SoVRMLSphereSensor::dragFinish(), SoVRMLPlaneSensor::dragFinish(), SoVRMLCylinderSensor::dragFinish(), and SoVRMLDragSensor().


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

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Mon Feb 23 16:34:07 2009 for Coin by Doxygen. 1.5.8