#include <HLShape.h>
Inheritance diagram for H3D::HLShape:

Public Member Functions | |
| virtual void | hlRender (HLHapticsDevice *hd)=0 |
| This function performs all the HLAPI calls that are needed to render the surface. | |
| virtual | ~HLShape () |
| Destructor. | |
| HLuint | getShapeId (HLHapticsDevice *hd) |
| Get the HLAPI shape id that is used to render this shape. | |
| virtual bool | closeEnoughToBound (const Vec3f &p, const Vec3f &previous_p, const Matrix4f &m, X3DGeometryNode *geom) |
| Returns true if the proxy is close enough to the bound of the geometry to be considered for haptics rendering. | |
Static Public Member Functions | |
| static HLShape * | getHLShape (HLuint id) |
| Given an shape id return the HLShape with that id. | |
| static void | resetShapeIdDB () |
| Reset the shape id database, removing all previous info on how many times a Node has appeared. | |
| static unsigned int | getFreeShapeIdIndex (X3DGeometryNode *geom, HLHapticsDevice *hd) |
| Given a pointer to a Node return an index indicating how many times this node has been used to generate a HLShape. | |
Protected Types | |
|
typedef std::map< std::pair< X3DGeometryNode *, HLHapticsDevice * >, unsigned int > | ShapeIdMap |
|
typedef std::multimap< HLuint, HLShape * > | HLShapeMap |
Protected Attributes | |
| std::vector< HLuint > | shape_ids |
| The shape ids that are used by this HLShape. | |
Static Protected Attributes | |
| static ShapeIdMap | shape_id_db |
| We maintain a database of how many times the same Node has been used to create a HLShape. | |
| static HLShapeMap | hl_shape_map |
| A static map from shape id to HLShape *. | |
It provides a unique HLAPI shape identifier to be used in calls to hlBeginShape.
|
||||||||||||||||||||
|
Returns true if the proxy is close enough to the bound of the geometry to be considered for haptics rendering. By default the values from OpenHapticsOptions nodes are used. p is in global coordinates and m is the transformation matrix from global to local space. |
|
||||||||||||
|
Given a pointer to a Node return an index indicating how many times this node has been used to generate a HLShape. Can be given as argument to X3DGeometry::getShapeId() in order to get a unique shape id regardless of how many times the node appears in the scene graph. |
|
|
We maintain a database of how many times the same Node has been used to create a HLShape. Since Nodes can be shared in several places in the scene graph it can generate several HLShapes. HLAPI requires each of these to have a unique id. Hence we must keep track of how many times a Node that generates a HLShape appears in the scene graph. The map is from pointer to nr of times the pointer has appeared since the last call to resetShapeIdDB(). |
1.4.5