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

Constructor & Destructor Documentation

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

Constructor.

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

Constructor.


Member Function Documentation

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

Returns the name of the class.

Reimplemented from vl::RenderState.

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

Returns RS_ClipPlane0 + planeIndex()

Reimplemented from vl::RenderState.

void ClipPlane::apply ( const Camera camera,
OpenGLContext  
) const [virtual]

Applies the light render states.

Implements vl::RenderState.

void vl::ClipPlane::followTransform ( Transform transform ) [inline]

Attach the light to a vl::Transform.

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

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

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

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

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.

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.

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

Returns the actual plane used to perform the clipping.

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

Defines the actual plane used to perform the clipping.


Member Data Documentation

int vl::ClipPlane::mPlaneIndex [protected]

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

Visualization Library v2010.11.1123 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Thu Nov 18 2010 02:07:58.
Permission is granted to use this page to write and publish articles regarding Visualization Library.