Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

osgHaptics::ContactState Class Reference

ContactState contains information about a contact event between two objects or two materials. More...

#include <ContactState.h>

Collaboration diagram for osgHaptics::ContactState:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ContactEvent { , Separation = 0x1, Contact = 0x2, Motion = 0x4, All = Separation|Contact|Motion }
 Indicates which type of event that has occured. More...

Public Member Functions

 ContactState ()
 Base constructor.
 ContactState (const ContactState &o)
 Copy constructor.
ContactStateoperator= (const ContactState &o)
 Copy operator.
virtual ~ContactState ()
 Destructor.
void clear ()
 Resets the state to its default values.
void set (ContactEvent event, Shape *shape, HapticDevice *, double time)
 Sets the state of the collision event this method is called by the collision manager.
void set (ContactEvent event, Shape *shape, HapticDevice *, const osg::Vec3 &pos, const osg::Vec3 &normal, double time)
 Sets the state of the collision event this method is called by the collision manager.
ShapegetShape ()
 Return one of the objects involved in the collision.
osg::Vec3 getContactPosition () const
osg::Vec3 getContactNormal () const
osg::Vec3 getVelocity () const
double getTime () const
 Return time of event (in simulation time).
ContactEvent getEvent () const
 Return the type of the event that has occured.

Detailed Description

ContactState contains information about a contact event between two objects or two materials.


Member Enumeration Documentation

enum osgHaptics::ContactState::ContactEvent
 

Indicates which type of event that has occured.

Enumerator:
Separation  No event at all.
Contact  Proxy has separated from shape.
Motion  Proxy has first contact.
All  Contact and moving.


Member Function Documentation

osg::Vec3 osgHaptics::ContactState::getContactNormal  )  const [inline]
 

Returns:
the normal of the first contact

osg::Vec3 osgHaptics::ContactState::getContactPosition  )  const [inline]
 

Returns:
the position of the contact

osg::Vec3 osgHaptics::ContactState::getVelocity  )  const [inline]
 

Returns:
the velocity of the proxy at contact time


The documentation for this class was generated from the following file:
Generated on Wed May 10 16:29:45 2006 for osgHaptics by  doxygen 1.4.4