# Visualization Library

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

[Home] [Tutorials] [All Classes] [Grouped Classes]

Public Member Functions | Protected Attributes

# vl::Plane Class Reference

The Plane class defines a plane using a normal and an origin. More...

`#include <Plane.hpp>`

Inheritance diagram for vl::Plane:

List of all members.

## 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

## Detailed Description

The Plane class defines a plane using a normal and an origin.

Definition at line 49 of file Plane.hpp.

## Constructor & Destructor Documentation

vl::Plane::Plane | ( | real | o = `0.0f`,
|  | vec3 | n = `vec3(0,0,0)`
| ) |  | `[inline]`

Definition at line 54 of file Plane.hpp.

References VL_DEBUG_SET_OBJECT_NAME.

vl::Plane::Plane | ( | const vec3 & | o,
|  | const vec3 & | n
| ) |  | `[inline]`

Definition at line 59 of file Plane.hpp.

References vl::dot(), and VL_DEBUG_SET_OBJECT_NAME.

## Member Function Documentation

real Plane::distance | ( | const vec3 & | v ) | const

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().

## Member Data Documentation

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().

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlCore/Plane.hpp
- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlCore/Plane.cpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:13.
Permission is granted to use this page to write and publish articles regarding Visualization Library.