Manipulator to transform a clipping plane. More...
#include <Inventor/manips/SoClipPlaneManip.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoClipPlaneManip () | |
SoDragger * | getDragger () |
virtual SoNode * | copy (SbBool copyConnections=FALSE) const |
void | setValue (const SbBox3f &box, const SbVec3f &planeNormal, float draggerScaleFactor) |
SbBool | replaceNode (SoPath *p) |
SbBool | replaceManip (SoPath *p, SoClipPlane *newOne) const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFVec3f | draggerPosition |
This class defines a manipulator to transform a clipping plane. An SoJackDragger allows the user to rotate and translate the clipping plane.
This node clips all subsequent shapes in the scene graph to the half-space defined by the plane field. The half-space that is rendered is on the side of the plane in the direction of the plane normal. The half-space that is clipped away is on the side of the plane opposite the direction of the plane normal. For example, if the plane normal is 0,0,1 (pointing in the positive Z direction), then everything in the negative Z direction will be clipped away.
plane | 1 0 0 0 |
on | TRUE |
draggerPosition | 0 0 0 |
SoClipPlaneManip::SoClipPlaneManip | ( | ) |
Constructor.
Creates and returns an exact copy of the node.
If the node is a group, it copies the children as well. If copyConnections is TRUE (it is FALSE by default), any connections to (but not from) fields of the node are copied, as well. Note that multiple references to a node under the node to be copied will result in multiple references to the copy of that node. To be copyable, a custom node must define a default contructor. Note that OIV require that every custom node must define a default contructor.
Please also note that instance data other than Inventor fields and public children will not be copied by this method. If extra data needs to be copied as well, this method will have to be manually overridden.
Reimplemented from SoNode.
static SoType SoClipPlaneManip::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoClipPlane.
SoDragger* SoClipPlaneManip::getDragger | ( | ) |
Returns the dragger node being employed by this manip.
virtual SoType SoClipPlaneManip::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoClipPlane.
SbBool SoClipPlaneManip::replaceManip | ( | SoPath * | p, | |
SoClipPlane * | newOne | |||
) | const |
Replaces this manipulator with a regular SoClipPlane node.
Replaces a regular SoClipPlane node with this manipulator.
void SoClipPlaneManip::setValue | ( | const SbBox3f & | box, | |
const SbVec3f & | planeNormal, | |||
float | draggerScaleFactor | |||
) |
Convenience method to set the clip plane and the dragger position, orientation and size.
The clip plane will be the plane defined by planeNormal and the point at the center of box .
The dragger will be positioned at the center of box . The size of the dragger geometry will be the default size multiplied by a scale factor. This scale factor is the largest dimension of box multiplied by draggerScaleFactor . The default extent of the main part of SoJackDragger is 2, because it extends from -1 to 1 (note that the "arms" of this dragger extend further). Therefore to make the dragger fit inside the specified box, the draggerScaleFactor parameter should be set to 0.5.
Dragger position.