Tools::Clip Class Reference

#include <clip.h>

Collaboration diagram for Tools::Clip:

Collaboration graph
[legend]

List of all members.


Detailed Description

Clip objects.

Clip a scene with a plane. For instance, when visualizing a volume, clipping will reveal what is inside the volume

clip.png

Use and manipulate a clip plane with:

        Clip plane;

           plane.enable();
        // ... draw  ...
        // plane.display(); // optionnaly draw the plane
           plane.disable();

        plane.rotateWithScreen(delta_mouse_x, delta_mouse_y);
        plane.slide(delta_mouse_y);

Note, there is currently a maximum of 6 available clip planes If using more clip planes, an Error will be thrown

Public Member Functions

 Clip ()
 ~Clip ()
void enable ()
void disable ()
void slide (float d)
void rotateWithWorld (float dx, float dy)
void rotateWithScreen (float dx, float dy)
void display (bool use_cross_section=true) const
void init ()
void getPlaneMatrix (float m[]) const
void setPlaneMatrix (const float m[])

Classes

struct  PlaneManager
 transpose matrix


Constructor & Destructor Documentation

Tools::Clip::Clip (  ) 

Tools::Clip::~Clip (  ) 


Member Function Documentation

void Tools::Clip::enable (  ) 

enable clip plane when using this method while drawing every object drawn next will be clipped

void Tools::Clip::disable (  ) 

disable clip plane use this method after enable() while drawing

void Tools::Clip::slide ( float  d  ) 

slide plane

void Tools::Clip::rotateWithWorld ( float  dx,
float  dy 
)

rotate the plane from its current orientation

Parameters:
dx a rotation around the plane Y world axis
dy a rotation around the plane X world axis

void Tools::Clip::rotateWithScreen ( float  dx,
float  dy 
)

rotate plane with mouse movement this method requires the currnet modelview matrix, it is assumed to be the same as when "enable()" was called

Parameters:
dx a rotation around the screen Y axis (horizontal movement)
dy a rotation around the screen X axis (vertical movement)

void Tools::Clip::display ( bool  use_cross_section = true  )  const

display a plane close to the origin

Parameters:
use_cross_section draw a cross section of a unit centered cube

void Tools::Clip::init (  ) 

Use identity matrix for the clip plane, that is a plane normal to the Z axis

void Tools::Clip::getPlaneMatrix ( float  m[]  )  const

Get plane matrix

Parameters:
m (out) plane matrix (4x4 rotation and translation)

void Tools::Clip::setPlaneMatrix ( const float  m[]  ) 

Set modelview matrix


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

Generated on Tue Aug 4 17:57:43 2009 for libvd by  doxygen 1.5.5