Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The Plane class defines a plane using a normal and an origin. More...
#include <Plane.hpp>
Public Member Functions | |
Plane (real o=0.0f, vec3 n=vec3(0, 0, 0)) | |
Plane (const vec3 &o, const vec3 &n) | |
real | distance (const vec3 &v) const |
int | classify (const AABB &) const |
returns 0 if the AABB intersects the plane, 1 if it's in the positive side, -1 if it's in the negative side. | |
bool | isOutside (const AABB &) const |
const vec3 & | normal () const |
real | origin () const |
void | setNormal (const vec3 &normal) |
void | setOrigin (real origin) |
Protected Attributes | |
vec3 | mNormal |
real | mOrigin |
The Plane class defines a plane using a normal and an origin.
Definition at line 49 of file Plane.hpp.
Definition at line 54 of file Plane.hpp.
References VL_DEBUG_SET_OBJECT_NAME.
Definition at line 59 of file Plane.hpp.
References vl::dot(), and VL_DEBUG_SET_OBJECT_NAME.
Definition at line 40 of file Plane.cpp.
References vl::dot(), mNormal, and mOrigin.
Referenced by classify(), vl::Frustum::cull(), and isOutside().
int Plane::classify | ( | const AABB & | aabb ) | const |
returns 0 if the AABB intersects the plane, 1 if it's in the positive side, -1 if it's in the negative side.
Definition at line 54 of file Plane.cpp.
References distance(), vl::AABB::maxCorner(), vl::AABB::minCorner(), vl::Vector3< T_Scalar >::x(), vl::Vector3< T_Scalar >::y(), and vl::Vector3< T_Scalar >::z().
Referenced by vl::ActorKdTree::insertActor().
bool Plane::isOutside | ( | const AABB & | aabb ) | const |
Definition at line 45 of file Plane.cpp.
References distance(), vl::AABB::maxCorner(), vl::AABB::minCorner(), mNormal, vl::Vector3< T_Scalar >::x(), vl::Vector3< T_Scalar >::y(), and vl::Vector3< T_Scalar >::z().
Referenced by vl::Frustum::cull().
const vec3& vl::Plane::normal | ( | ) | const [inline] |
Definition at line 74 of file Plane.hpp.
Referenced by vl::Camera::adjustView(), vl::ClipPlane::apply(), and vl::VLXClassWrapper_ClipPlane::exportClipPlane().
real vl::Plane::origin | ( | ) | const [inline] |
Definition at line 76 of file Plane.hpp.
Referenced by vl::Camera::adjustView(), vl::ClipPlane::apply(), and vl::VLXClassWrapper_ClipPlane::exportClipPlane().
void vl::Plane::setNormal | ( | const vec3 & | normal ) | [inline] |
Definition at line 78 of file Plane.hpp.
Referenced by vl::ClipPlane::ClipPlane(), and vl::VLXClassWrapper_ClipPlane::importClipPlane().
void vl::Plane::setOrigin | ( | real | origin ) | [inline] |
Definition at line 80 of file Plane.hpp.
Referenced by vl::ClipPlane::ClipPlane(), and vl::VLXClassWrapper_ClipPlane::importClipPlane().
vec3 vl::Plane::mNormal [protected] |
Definition at line 83 of file Plane.hpp.
Referenced by distance(), and isOutside().
real vl::Plane::mOrigin [protected] |
Definition at line 84 of file Plane.hpp.
Referenced by distance().