Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes

vl::ClipPlane Class Reference

Wraps the OpenGL function glClipPlane(). More...

#include <ClipPlane.hpp>

Inheritance diagram for vl::ClipPlane:
vl::RenderState vl::Object

List of all members.

Public Member Functions

virtual const char * className ()
 Returns the name of the class.
 ClipPlane (int plane_index, Real o=0.0f, vec3 n=vec3(0, 0, 0))
 Constructor.
 ClipPlane (int plane_index, const vec3 &o, const vec3 &n)
 Constructor.
virtual ERenderState type () const
 Returns RS_ClipPlane0 + planeIndex()
virtual void apply (const Camera *camera, OpenGLContext *) const
 Applies the light render states.
void followTransform (Transform *transform)
 Attach the light to a vl::Transform.
TransformfollowedTransform ()
 Returns the vl::Transform to which the Light is attached.
const TransformfollowedTransform () const
 Returns the vl::Transform to which the Light is attached.
void setPlaneIndex (int plane_index)
 Defines the index of the plane this ClipPlane applies.
int planeIndex () const
 Returns the index of the plane this ClipPlane applies.
const Planeplane () const
 Returns the actual plane used to perform the clipping.
void setPlane (const Plane &plane)
 Defines the actual plane used to perform the clipping.

Protected Attributes

int mPlaneIndex
ref< TransformmFollowedTransform
Plane mPlane

Detailed Description

Wraps the OpenGL function glClipPlane().

See also http://www.opengl.org/sdk/docs/man/xhtml/glClipPlane.xml

See also:
Shader, Effect, Actor

Definition at line 49 of file ClipPlane.hpp.


Constructor & Destructor Documentation

ClipPlane::ClipPlane ( int  plane_index,
Real  o = 0.0f,
vec3  n = vec3(0,0,0) 
)

Constructor.

Definition at line 37 of file ClipPlane.cpp.

References mPlane, mPlaneIndex, vl::Plane::setNormal(), vl::Plane::setOrigin(), and VL_DEBUG_SET_OBJECT_NAME.

ClipPlane::ClipPlane ( int  plane_index,
const vec3 o,
const vec3 n 
)

Member Function Documentation

virtual const char* vl::ClipPlane::className (  ) [inline, virtual]

Returns the name of the class.

Reimplemented from vl::RenderState.

Definition at line 52 of file ClipPlane.hpp.

virtual ERenderState vl::ClipPlane::type (  ) const [inline, virtual]

Returns RS_ClipPlane0 + planeIndex()

Reimplemented from vl::RenderState.

Definition at line 58 of file ClipPlane.hpp.

References vl::RS_ClipPlane0.

void ClipPlane::apply ( const Camera camera,
OpenGLContext  
) const [virtual]
void vl::ClipPlane::followTransform ( Transform transform ) [inline]

Attach the light to a vl::Transform.

Definition at line 62 of file ClipPlane.hpp.

Transform* vl::ClipPlane::followedTransform (  ) [inline]

Returns the vl::Transform to which the Light is attached.

Definition at line 64 of file ClipPlane.hpp.

Referenced by apply().

const Transform* vl::ClipPlane::followedTransform (  ) const [inline]

Returns the vl::Transform to which the Light is attached.

Definition at line 66 of file ClipPlane.hpp.

void vl::ClipPlane::setPlaneIndex ( int  plane_index ) [inline]

Defines the index of the plane this ClipPlane applies.

OpenGL supports up to 6 custom clip planes at the same time thus the index must be a number between 0 and 5.

Definition at line 70 of file ClipPlane.hpp.

int vl::ClipPlane::planeIndex (  ) const [inline]

Returns the index of the plane this ClipPlane applies.

OpenGL supports up to 6 custom clip planes at the same time thus the index will be a number between 0 and 5.

Definition at line 74 of file ClipPlane.hpp.

Referenced by apply().

const Plane& vl::ClipPlane::plane (  ) const [inline]

Returns the actual plane used to perform the clipping.

Definition at line 76 of file ClipPlane.hpp.

void vl::ClipPlane::setPlane ( const Plane plane ) [inline]

Defines the actual plane used to perform the clipping.

Definition at line 78 of file ClipPlane.hpp.


Member Data Documentation

int vl::ClipPlane::mPlaneIndex [protected]

Definition at line 81 of file ClipPlane.hpp.

Referenced by ClipPlane().

Definition at line 82 of file ClipPlane.hpp.

Definition at line 83 of file ClipPlane.hpp.

Referenced by apply(), and ClipPlane().


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

Visualization Library v2011.05.1142 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu May 26 2011 22:51:37.
Permission is granted to use this page to write and publish articles regarding Visualization Library.