H3D::ClipPlane Class Reference
[H3D specific Node classes.]

This node defines a single plane equation that will be used to clip the geometry, i.e. More...

#include <H3D/ClipPlane.h>

Inheritance diagram for H3D::ClipPlane:

Inheritance graph

List of all members.

Public Member Functions

 ClipPlane (Inst< SFNode > _metadata=0, Inst< SFBool > _enabled=0, Inst< SFVec4d > _plane=0, Inst< SFBool > _clipHaptics=0, Inst< SFBool > _clipGraphics=0)
 Constructor.
virtual void enableGraphicsState ()
 Turn the clip plane on.
virtual void disableGraphicsState ()
 Turn the clip plane off.
virtual void enableHapticsState (TraverseInfo &ti)
 Disable haptics if device position is on the clipped side of the clip plane.
virtual void disableHapticsState (TraverseInfo &ti)
 Reenable haptics.

Public Attributes

auto_ptr< SFBoolenabled
 Specifies if the clipping plane should be enabled or not.
auto_ptr< SFVec4dplane
 The plane equation that will be used to clip the geometry.
auto_ptr< SFBoolclipHaptics
 Specifies if the clipping plane should clip the haptics if enabled, i.e.
auto_ptr< SFBoolclipGraphics
 Specifies if the clipping plane should clip the graphics if enabled.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
static int nr_active_clip_planes = 0
 The number of clip planes that are currently rendered.

Protected Attributes

int plane_index
 The index of the plane when rendered by OpenGL.
bool haptics_enabled
 Was haptics enabled in the last call to enableHapticsState()?

Static Protected Attributes

static GLint max_nr_clip_planes = -1
 The maximum number of clip planes the graphics hardware supports.


Detailed Description

This node defines a single plane equation that will be used to clip the geometry, i.e.

remove parts of it from rendering.

The plane field defines a plane equation that will be used to clip the geometry. The points that are drawn are the points that satisfy the inequation: plane.x*x+plane.y*y+plane.z*z+plane.w >= 0

Clipping only occurs of the enabled field is 'true'.

The clipHaptics field specifies if the clipping plane should clip the haptics if enabled, i.e. if the haptics device is in a position that is clipped by the plane no haptics will be rendered for the device and the clipGraphics field specifies if the graphics should be clipped when the ClipPlane is enabled.

Internal routes:
ClipPlane.dot

Member Function Documentation

void ClipPlane::disableHapticsState ( TraverseInfo ti  )  [virtual]

Reenable haptics.

Parameters:
ti The TraverseInfo object containing information about the traversal.

Reimplemented from H3D::H3DRenderStateObject.

References H3D::TraverseInfo::disableHaptics(), H3D::TraverseInfo::enableHaptics(), and haptics_enabled.

void ClipPlane::enableHapticsState ( TraverseInfo ti  )  [virtual]

Disable haptics if device position is on the clipped side of the clip plane.

Parameters:
ti The TraverseInfo object containing information about the traversal.

Reimplemented from H3D::H3DRenderStateObject.

References clipHaptics, H3D::TraverseInfo::disableHaptics(), H3D::TraverseInfo::getAccInverseMatrix(), H3D::TraverseInfo::getHapticsDevice(), H3D::TraverseInfo::getHapticsDevices(), haptics_enabled, H3D::TraverseInfo::hapticsEnabled(), plane, and H3D::H3DHapticsDevice::trackerPosition.


Member Data Documentation

Specifies if the clipping plane should clip the graphics if enabled.

Access type: inputOutput
Default value: true

ClipPlane_enabled.dot

Referenced by ClipPlane(), disableGraphicsState(), and enableGraphicsState().

Specifies if the clipping plane should clip the haptics if enabled, i.e.

if the haptics device is in a position that is clipped by the plane no haptics will be rendered for the device.

Access type: inputOutput
Default value: true

ClipPlane_clipHaptics.dot

Referenced by ClipPlane(), and enableHapticsState().

Specifies if the clipping plane should be enabled or not.

Access type: inputOutput
Default value: true

ClipPlane_enabled.dot

Referenced by ClipPlane(), disableGraphicsState(), and enableGraphicsState().

GLint ClipPlane::max_nr_clip_planes = -1 [static, protected]

The maximum number of clip planes the graphics hardware supports.

Set in the first call to enable().

Referenced by disableGraphicsState(), and enableGraphicsState().

The plane equation that will be used to clip the geometry.

The points that are drawn are the points that satisfy the inequation: plane.x*x+plane.y*y+plane.z*z+plane.w >= 0

Access type: inputOutput
Default value: Vec4d( 0, 1, 0, 0 )

ClipPlane_plane.dot

Referenced by ClipPlane(), enableGraphicsState(), enableHapticsState(), and H3D::PointNormalClipPlane::PointNormalClipPlane().

int H3D::ClipPlane::plane_index [protected]

The index of the plane when rendered by OpenGL.

-1 if currently not rendered.

Referenced by ClipPlane(), disableGraphicsState(), and enableGraphicsState().


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

Generated on Fri Nov 7 10:29:28 2008 for H3D API by  doxygen 1.5.7