Visualization Library 2.1.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::ClipPlane Class Reference

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

#include <ClipPlane.hpp>

+ Inheritance diagram for vl::ClipPlane:

Public Member Functions

 ClipPlane (real o=0.0f, vec3 n=vec3(0, 0, 0))
 Constructor. More...
 
 ClipPlane (const vec3 &o, const vec3 &n)
 Constructor. More...
 
virtual ERenderState type () const
 Returns RS_ClipPlane0. More...
 
virtual void apply (int index, const Camera *camera, OpenGLContext *) const
 Applies the light render states. More...
 
void bindTransform (Transform *transform)
 Attach the light to a vl::Transform. More...
 
TransformboundTransform ()
 Returns the vl::Transform to which the Light is attached. More...
 
const TransformboundTransform () const
 Returns the vl::Transform to which the Light is attached. More...
 
const Planeplane () const
 Returns the actual plane used to perform the clipping. More...
 
Planeplane ()
 Returns the actual plane used to perform the clipping. More...
 
void setPlane (const Plane &plane)
 Defines the actual plane used to perform the clipping. More...
 
virtual ref< RenderStateclone () const
 
void setEnabled (bool enabled)
 
bool enabled () const
 
- Public Member Functions inherited from vl::RenderStateIndexed
 RenderStateIndexed ()
 
- Public Member Functions inherited from vl::RenderState
 RenderState ()
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Attributes

ref< TransformmBoundTransform
 
Plane mPlane
 
bool mEnabled
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

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() [1/2]

ClipPlane::ClipPlane ( real  o = 0.0f,
vec3  n = vec3(0,0,0) 
)

Constructor.

Definition at line 37 of file ClipPlane.cpp.

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

◆ ClipPlane() [2/2]

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

Constructor.

Definition at line 45 of file ClipPlane.cpp.

References vl::dot(), mEnabled, mPlane, vl::Plane::setNormal(), and vl::Plane::setOrigin().

Member Function Documentation

◆ apply()

void ClipPlane::apply ( int  index,
const Camera camera,
OpenGLContext  
) const
virtual

◆ bindTransform()

void vl::ClipPlane::bindTransform ( Transform transform)
inline

Attach the light to a vl::Transform.

Definition at line 68 of file ClipPlane.hpp.

Referenced by vlX::VLXClassWrapper_ClipPlane::importClipPlane().

◆ boundTransform() [1/2]

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 vlX::VLXClassWrapper_ClipPlane::exportClipPlane().

◆ boundTransform() [2/2]

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.

◆ clone()

virtual ref<RenderState> vl::ClipPlane::clone ( ) const
inlinevirtual

Implements vl::RenderState.

Definition at line 85 of file ClipPlane.hpp.

◆ enabled()

bool vl::ClipPlane::enabled ( ) const
inline

Definition at line 94 of file ClipPlane.hpp.

Referenced by apply().

◆ plane() [1/2]

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 vlX::VLXClassWrapper_ClipPlane::exportClipPlane(), and vlX::VLXClassWrapper_ClipPlane::importClipPlane().

◆ plane() [2/2]

Plane& vl::ClipPlane::plane ( )
inline

Returns the actual plane used to perform the clipping.

Definition at line 80 of file ClipPlane.hpp.

◆ setEnabled()

void vl::ClipPlane::setEnabled ( bool  enabled)
inline

Definition at line 92 of file ClipPlane.hpp.

◆ setPlane()

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.

◆ type()

virtual ERenderState vl::ClipPlane::type ( ) const
inlinevirtual

Returns RS_ClipPlane0.

Reimplemented from vl::RenderState.

Definition at line 62 of file ClipPlane.hpp.

References vl::RS_ClipPlane.

Member Data Documentation

◆ mBoundTransform

ref<Transform> vl::ClipPlane::mBoundTransform
protected

Definition at line 97 of file ClipPlane.hpp.

◆ mEnabled

bool vl::ClipPlane::mEnabled
protected

Definition at line 99 of file ClipPlane.hpp.

Referenced by ClipPlane().

◆ mPlane

Plane vl::ClipPlane::mPlane
protected

Definition at line 98 of file ClipPlane.hpp.

Referenced by apply(), and ClipPlane().


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