SoCast Class Reference

#include <SoCast.h>

Inheritance diagram for SoCast:

SoShadowCast SoPickableShadowCast

List of all members.

Public Types

enum  LightMode { FREE, PLANE, CAMERA }
 How to cast regarding the light. More...

Public Member Functions

const SbVec4f & getCurLightDir () const
 Return the vector used to setup the current cast matrix.
void animatePlaneAngleAssignment (float newAngle)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)
virtual void GLRenderBelowPath (SoGLRenderAction *action)
virtual void GLRenderInPath (SoGLRenderAction *action)
virtual void commonGLRender (SoGLRenderAction *action)
const SbVec3f & getNearestPlaneVertex ()
const SbVec3f & getFarestPlaneVertex ()
virtual const SbVec3f & getFarestSceneVertex ()

Static Public Member Functions

static void initClass ()

Public Attributes

SoSFVec4f lightPos
 Direction of the light. Default is (-1,-1,-1,0).
SoSFEnum lightMode
 ... . Default is (FREE).
SoSFPlane projectionPlane
 Plane to cast projected model onto. Default is ((0, 1, 0), 0).
SoSFFloat planeAngle
 Rotation around camera side vector. Default is (SbDeg2Rad<float>(40)).
SoSFColor castColor
 Color used to draw projected shapes. Default is (0.65, 0.62, 0.51).
SoSFBool castRender
 Enable/disable cast render pass. Default is (TRUE).

Protected Member Functions

 SoCast ()
 Protected constructor.
virtual ~SoCast ()
SbPlane cameraToPlane (SoState *state, SbGroundplane &area)
 Calculates plane and plane vertices from viewing state.
SbBox3f getPlaneBoundingBox (SoState *state, SbBool usePlaneElement=FALSE)
 Calculates bounding box for plane.
virtual void normalRenderSetup (SoGLRenderAction *)
virtual void castRenderSetup (SoGLRenderAction *)
virtual SbMatrix getCastMatrix (SoState *)
void adjustCurrentCameraClippingPlanes (SoState *state)

Protected Attributes

SbVec4f _curlightPos
SbGroundplane _curPlaneArea


Detailed Description

Definition at line 39 of file SoCast.h.


Member Enumeration Documentation

How to cast regarding the light.

Enumerator:
FREE  The field "lightPos" is used.
PLANE  Light is perpendicular to the shadow plane.
CAMERA  Light comes from the current camera.

Definition at line 91 of file SoCast.h.


Constructor & Destructor Documentation

SoCast::SoCast (  )  [protected]

Protected constructor.

virtual SoCast::~SoCast (  )  [protected, virtual]


Member Function Documentation

void SoCast::adjustCurrentCameraClippingPlanes ( SoState *  state  )  [protected]

Adjust camera clipping planes to contain the entire scene including shadow projection plane.

void SoCast::animatePlaneAngleAssignment ( float  newAngle  ) 

SbPlane SoCast::cameraToPlane ( SoState *  state,
SbGroundplane area 
) [protected]

Calculates plane and plane vertices from viewing state.

virtual void SoCast::castRenderSetup ( SoGLRenderAction *   )  [protected, virtual]

Called from GLRender() before rendering traversal of model in cast-mode starts. SoShadowRenderElement will be set by GLRender().

virtual void SoCast::commonGLRender ( SoGLRenderAction *  action  )  [virtual]

Reimplemented in SoShadowCast.

virtual void SoCast::getBoundingBox ( SoGetBoundingBoxAction *  action  )  [virtual]

virtual SbMatrix SoCast::getCastMatrix ( SoState *   )  [protected, virtual]

Returns a matrix projecting model vertices on a plane. Method is used by castRenderSetup().

const SbVec4f& SoCast::getCurLightDir (  )  const [inline]

Return the vector used to setup the current cast matrix.

This value depends on the current lightMode.

Definition at line 125 of file SoCast.h.

const SbVec3f& SoCast::getFarestPlaneVertex (  )  [inline]

Definition at line 141 of file SoCast.h.

virtual const SbVec3f& SoCast::getFarestSceneVertex (  )  [inline, virtual]

Definition at line 143 of file SoCast.h.

const SbVec3f& SoCast::getNearestPlaneVertex (  )  [inline]

Used by viewers to extend clipping planes. Returns the nearest/farest plane vertex from the camera.

Definition at line 140 of file SoCast.h.

SbBox3f SoCast::getPlaneBoundingBox ( SoState *  state,
SbBool  usePlaneElement = FALSE 
) [protected]

Calculates bounding box for plane.

virtual void SoCast::GLRenderBelowPath ( SoGLRenderAction *  action  )  [virtual]

virtual void SoCast::GLRenderInPath ( SoGLRenderAction *  action  )  [virtual]

static void SoCast::initClass (  )  [static]

Reimplemented in SoPickableShadowCast, and SoShadowCast.

virtual void SoCast::normalRenderSetup ( SoGLRenderAction *   )  [inline, protected, virtual]

Called from GLRender() before normal rendering traversal of model starts. SoShadowRenderElement will be set by GLRender().

Definition at line 68 of file SoCast.h.


Member Data Documentation

SbVec4f SoCast::_curlightPos [protected]

Definition at line 49 of file SoCast.h.

Definition at line 50 of file SoCast.h.

SoSFColor SoCast::castColor

Color used to draw projected shapes. Default is (0.65, 0.62, 0.51).

Definition at line 116 of file SoCast.h.

Enable/disable cast render pass. Default is (TRUE).

Definition at line 119 of file SoCast.h.

... . Default is (FREE).

Definition at line 101 of file SoCast.h.

SoSFVec4f SoCast::lightPos

Direction of the light. Default is (-1,-1,-1,0).

Definition at line 98 of file SoCast.h.

SoSFFloat SoCast::planeAngle

Rotation around camera side vector. Default is (SbDeg2Rad<float>(40)).

Value is only used if field projectionPlane is ignored.

Definition at line 113 of file SoCast.h.

Plane to cast projected model onto. Default is ((0, 1, 0), 0).

If the field is set to be ignored, compute plane from camera.

Definition at line 107 of file SoCast.h.


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

Generated on Sat Sep 3 18:39:32 2011 for MeVisLab Toolbox Reference by  doxygen 1.5.8