H3D API  2.4.1
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
H3D::OpenHapticsOptions Class Reference

Specifies parameters to use for when rendering an object with OpenHaptics. More...

#include <H3D/OpenHapticsOptions.h>

Inheritance diagram for H3D::OpenHapticsOptions:
Inheritance graph

Public Member Functions

 OpenHapticsOptions (Inst< SFNode > _metadata=0, Inst< SFString > _GLShape=0, Inst< SFBool > _useAdaptiveViewport=0, Inst< SFBool > _useHapticCameraView=0, Inst< SFBool > _forceFullGeometryRender=0)
 Constructor.
 
- Public Member Functions inherited from H3D::H3DOptionNode
 H3DOptionNode (Inst< SFNode > _metadata=0)
 Constructor.
 
virtual string defaultXMLContainerField ()
 Returns the default xml containerField attribute value. More...
 
- Public Member Functions inherited from H3D::X3DNode
 X3DNode (Inst< SFNode > _metadata=0)
 Constructor.
 
X3DMetadataObjectgetMetadataByName (const string &_name)
 Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More...
 
- Public Member Functions inherited from H3D::Node
 Node ()
 Constructor.
 
virtual Nodeclone (bool deepCopy=true, DeepCopyMap *deepCopyMap=NULL)
 Returns a new instance of this node type with the same state as this one. More...
 
virtual ~Node ()
 Destructor.
 
X3DPrototypeInstancegetProtoInstanceParent ()
 If this node is the root node in the proto body of a X3DPrototypeInstance then this will return that node. More...
 
void setProtoInstanceParent (X3DPrototypeInstance *p)
 Set the X3DPrototypeInstance this node is the the root node if applicaple.
 
virtual void render ()
 the render() function is used for the depth-first rendering traversal of the scene-graph. More...
 
virtual void traverseSG (TraverseInfo &ti)
 traverseSG is called once per scenegraph loop on the scene in order to traverse the scenegraph. More...
 
virtual bool lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result)
 Detect intersection between a line segment and the Node. More...
 
virtual void closestPoint (const Vec3f &p, NodeIntersectResult &result)
 Find closest point on Node to p. More...
 
virtual bool movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result)
 Detect collision between a moving sphere and the Node. More...
 
virtual FieldgetField (const string &_name) const
 return a pointer to the field specified by name within this instance
 
int addDestructCallback (void(*func)(Node *, void *), void *args)
 Add a callback function to be run on destruction of node. More...
 
int removeDestructCallback (void(*func)(Node *, void *), void *args)
 Add a callback function to be run on destruction of node. More...
 

Public Attributes

H3DUniquePtr< SFStringGLShape
 Specifies the OpenHaptics shape type to use when rendering shapes using OpenGL. More...
 
H3DUniquePtr< SFBooluseAdaptiveViewport
 The default setting for use of adaptive viewport. More...
 
H3DUniquePtr< SFBooluseHapticCameraView
 The default setting for use of haptic camera view. More...
 
H3DUniquePtr< SFBoolforceFullGeometryRender
 If set to true all X3DGeometryNodes will be rendered fully using OpenHaptics. More...
 
- Public Attributes inherited from H3D::H3DOptionNode
H3DUniquePtr< FieldupdateOption
 Field to collect update event from every option parameters, all inherited Option Node should route its option parameter fields to it.
 
- Public Attributes inherited from H3D::X3DNode
H3DUniquePtr< SFNodemetadata
 Meta data about the node. More...
 

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 
- Static Public Attributes inherited from H3D::X3DNode
static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 

Additional Inherited Members

- Public Types inherited from H3D::Node
typedef std::map< Node *, Node * > DeepCopyMap
 A map type used during a deep copy clone() to map from original nodes to cloned nodes.
 
- Static Public Member Functions inherited from H3D::Node
static unsigned int nrNodesAlive ()
 Returns the nr of nodes currently alive, i.e. nodes created but not destructed.
 
static int nrNodesCreated ()
 Returns the number of nodes created in total since the start of the program.
 
- Protected Member Functions inherited from H3D::Node
void cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for the clone() method. More...
 
- Static Protected Member Functions inherited from H3D::Node
static NodegetClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for nodes that implement clone() More...
 

Detailed Description

Specifies parameters to use for when rendering an object with OpenHaptics.

Examples:

Member Data Documentation

◆ forceFullGeometryRender

H3DUniquePtr< SFBool > H3D::OpenHapticsOptions::forceFullGeometryRender

If set to true all X3DGeometryNodes will be rendered fully using OpenHaptics.

If false, only the triangles rendered depending on the options in HapticsOptions will be rendered. If you want to make sure that all triangles are sent to OpenHaptics to be rendered you should set this to true. Observe however that if you set this to true, you have to use the OpenHapticsRenderer or you will get no haptics at all on the geometry.

Default value: false
Access type: inputOutput

Referenced by OpenHapticsOptions().

◆ GLShape

H3DUniquePtr< SFString > H3D::OpenHapticsOptions::GLShape

Specifies the OpenHaptics shape type to use when rendering shapes using OpenGL.

If "FEEDBACK_BUFFER" feedback buffer shapes are used and if "DEPTH_BUFFER" depth buffer shapes are used. Feedback buffer shapes give more accurate haptics rendering since it uses the actual triangles that are rendered. However more complex models might slow things down considerably. Depth buffer shapes are not as dependent on the complexity of the geometry, but instead uses the depth buffer that is of the same resolution no matter how many triangles are rendered into it.

Valid values: "FEEDBACK_BUFFER" or "DEPTH_BUFFER"
Default value: "FEEDBACK_BUFFER"
Access type: inputOutput

Referenced by OpenHapticsOptions().

◆ useAdaptiveViewport

H3DUniquePtr< SFBool > H3D::OpenHapticsOptions::useAdaptiveViewport

The default setting for use of adaptive viewport.

When using depth buffer shapes, performance may be improved by enabling the adaptive viewport optimization. This optimization limits the region of the depth buffer that is read into memory to be used for haptic rendering to the area near the current proxy position. The performance improvement will depend on the speed at which the graphics card is able to read the depth image from the on board memory of the graphics accelerator. On many graphics accelerators, reading data from the depth buffer can be very costly.

Default value: true
Access type: inputOutput

Referenced by OpenHapticsOptions().

◆ useHapticCameraView

H3DUniquePtr< SFBool > H3D::OpenHapticsOptions::useHapticCameraView

The default setting for use of haptic camera view.

When the haptic camera view is enabled, HLAPI will automatically modify the viewing parameters used when rendering a depth buffer or feedback buffer shape so that only a subset of the geometry near the proxy position will be rendered. When the haptic camera view is enabled, HLAPI modifies the OpenGL view frustum so that only the shape geometry near the proxy position is rendered. For feedback buffer shapes, this can dramatically increase performance by reducing the number of geometric primitives considered for haptic rendering. The improvement will depend on the density of the geometry in the region around the proxy, since denser geometry will lead to a larger number of primitives in the haptic view frustum. For depth buffer shapes, this offers less of a performance improvement, since once the primitives have been rendered to the depth buffer, the actual haptic rendering of a depth buffer image is not dependent on the number of primitives. That said, there is some performance benefit to considering only the geometry near the proxy when generating a depth buffer image. In addition, when using haptic camera view, HLAPI generates a depth buffer image that is a subset of the full depth buffer used by the graphics window so as with adaptive viewport, less data is read back from the depth buffer. If haptic camera view is enabled, the adaptive viewport setting is ignored. In addition, for depth buffer shapes, using haptic camera view allows you to feel parts of the geometry that are not viewable from the graphics view.

Default value: true
Access type: inputOutput

Referenced by OpenHapticsOptions().


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