Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Wraps the OpenGL function glClipPlane(). More...
#include <ClipPlane.hpp>
Public Member Functions | |
ClipPlane (real o=0.0f, vec3 n=vec3(0, 0, 0)) | |
Constructor. | |
ClipPlane (const vec3 &o, const vec3 &n) | |
Constructor. | |
virtual ERenderState | type () const |
Returns RS_ClipPlane0. | |
virtual void | apply (int index, const Camera *camera, OpenGLContext *) const |
Applies the light render states. | |
void | bindTransform (Transform *transform) |
Attach the light to a vl::Transform. | |
Transform * | boundTransform () |
Returns the vl::Transform to which the Light is attached. | |
const Transform * | boundTransform () const |
Returns the vl::Transform to which the Light is attached. | |
const Plane & | plane () const |
Returns the actual plane used to perform the clipping. | |
Plane & | plane () |
Returns the actual plane used to perform the clipping. | |
void | setPlane (const Plane &plane) |
Defines the actual plane used to perform the clipping. | |
virtual ref< RenderState > | clone () const |
void | setEnabled (bool enabled) |
bool | enabled () const |
Protected Attributes | |
ref< Transform > | mBoundTransform |
Plane | mPlane |
bool | mEnabled |
Wraps the OpenGL function glClipPlane().
See also http://www.opengl.org/sdk/docs/man/xhtml/glClipPlane.xml
Definition at line 49 of file ClipPlane.hpp.
Constructor.
Definition at line 37 of file ClipPlane.cpp.
References mEnabled, mPlane, vl::Plane::setNormal(), vl::Plane::setOrigin(), and VL_DEBUG_SET_OBJECT_NAME.
Constructor.
Definition at line 45 of file ClipPlane.cpp.
References vl::dot(), mEnabled, mPlane, vl::Plane::setNormal(), vl::Plane::setOrigin(), and VL_DEBUG_SET_OBJECT_NAME.
virtual ERenderState vl::ClipPlane::type | ( | ) | const [inline, virtual] |
Returns RS_ClipPlane0.
Reimplemented from vl::RenderState.
Definition at line 62 of file ClipPlane.hpp.
References vl::RS_ClipPlane.
void ClipPlane::apply | ( | int | index, |
const Camera * | camera, | ||
OpenGLContext * | |||
) | const [virtual] |
Applies the light render states.
Implements vl::RenderState.
Definition at line 53 of file ClipPlane.cpp.
References boundTransform(), vl::dot(), enabled(), mPlane, vl::Plane::normal(), vl::Plane::origin(), vl::Camera::viewMatrix(), VL_CHECK, vl::Transform::worldMatrix(), vl::Vector3< T_Scalar >::x(), vl::Vector3< T_Scalar >::y(), and vl::Vector3< T_Scalar >::z().
void vl::ClipPlane::bindTransform | ( | Transform * | transform ) | [inline] |
Attach the light to a vl::Transform.
Definition at line 68 of file ClipPlane.hpp.
Referenced by vl::VLXClassWrapper_ClipPlane::importClipPlane().
Transform* vl::ClipPlane::boundTransform | ( | ) | [inline] |
Returns the vl::Transform to which the Light is attached.
Definition at line 71 of file ClipPlane.hpp.
Referenced by apply(), and vl::VLXClassWrapper_ClipPlane::exportClipPlane().
const Transform* vl::ClipPlane::boundTransform | ( | ) | const [inline] |
Returns the vl::Transform to which the Light is attached.
Definition at line 74 of file ClipPlane.hpp.
const Plane& vl::ClipPlane::plane | ( | ) | const [inline] |
Returns the actual plane used to perform the clipping.
Definition at line 77 of file ClipPlane.hpp.
Referenced by vl::VLXClassWrapper_ClipPlane::exportClipPlane(), and vl::VLXClassWrapper_ClipPlane::importClipPlane().
Plane& vl::ClipPlane::plane | ( | ) | [inline] |
Returns the actual plane used to perform the clipping.
Definition at line 80 of file ClipPlane.hpp.
void vl::ClipPlane::setPlane | ( | const Plane & | plane ) | [inline] |
Defines the actual plane used to perform the clipping.
Definition at line 83 of file ClipPlane.hpp.
virtual ref<RenderState> vl::ClipPlane::clone | ( | ) | const [inline, virtual] |
Implements vl::RenderState.
Definition at line 85 of file ClipPlane.hpp.
void vl::ClipPlane::setEnabled | ( | bool | enabled ) | [inline] |
Definition at line 92 of file ClipPlane.hpp.
bool vl::ClipPlane::enabled | ( | ) | const [inline] |
Definition at line 94 of file ClipPlane.hpp.
Referenced by apply().
ref<Transform> vl::ClipPlane::mBoundTransform [protected] |
Definition at line 97 of file ClipPlane.hpp.
Plane vl::ClipPlane::mPlane [protected] |
Definition at line 98 of file ClipPlane.hpp.
Referenced by apply(), and ClipPlane().
bool vl::ClipPlane::mEnabled [protected] |
Definition at line 99 of file ClipPlane.hpp.
Referenced by ClipPlane().