Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Wraps the OpenGL function glClipPlane(). More...
#include <ClipPlane.hpp>
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. | |
| Transform * | followedTransform () |
| Returns the vl::Transform to which the Light is attached. | |
| const Transform * | followedTransform () 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 Plane & | plane () 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< Transform > | mFollowedTransform |
| Plane | mPlane |
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 mPlane, mPlaneIndex, vl::Plane::setNormal(), vl::Plane::setOrigin(), and VL_DEBUG_SET_OBJECT_NAME.
Constructor.
Definition at line 45 of file ClipPlane.cpp.
References vl::dot(), mPlane, mPlaneIndex, vl::Plane::setNormal(), vl::Plane::setOrigin(), and VL_DEBUG_SET_OBJECT_NAME.
| 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] |
Applies the light render states.
Implements vl::RenderState.
Definition at line 53 of file ClipPlane.cpp.
References vl::dot(), followedTransform(), mPlane, vl::Plane::normal(), vl::Plane::origin(), planeIndex(), 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::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.
int vl::ClipPlane::mPlaneIndex [protected] |
Definition at line 81 of file ClipPlane.hpp.
Referenced by ClipPlane().
ref<Transform> vl::ClipPlane::mFollowedTransform [protected] |
Definition at line 82 of file ClipPlane.hpp.
Plane vl::ClipPlane::mPlane [protected] |
Definition at line 83 of file ClipPlane.hpp.
Referenced by apply(), and ClipPlane().