Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

nvmath::Plane3f Class Reference

Plane class. More...

#include <Plane3f.h>

Collaboration diagram for nvmath::Plane3f:

Collaboration graph
[legend]
List of all members.

Public Member Functions

NVSG_API Plane3f (void)
 Default constructor.
NVSG_API Plane3f (const Vec3f &n, float c)
 Constructor by normal and offset.
NVSG_API Plane3f (const Vec3f &n, const Vec3f &p)
 Constructor by normal and point on plane.
NVSG_API Plane3f (const Vec3f &p0, const Vec3f &p1, const Vec3f &p2)
 Constructor by three points.
NVSG_API Plane3f operator- (void) const
 Negation operator.
NVSG_API Plane3foperator= (const Plane3f &pl)
 Assignment operator.
NVSG_API bool operator== (const Plane3f &pl) const
 Equality operator.
NVSG_API bool operator!= (const Plane3f &pl) const
 Inequality operator.
NVSG_API float operator() (const Vec3f &p) const
 Calling operator.
NVSG_API Vec3fn (void)
 Non-constant access to the plane normal.
NVSG_API const Vec3fn (void) const
 Constant access to the plane normal.
NVSG_API float & c (void)
 Non-constant access to the plane offset.
NVSG_API const float & c (void) const
 Constant access to the plane offset.

Related Functions

(Note that these are not member functions.)

bool areOnOppositeSides (const Plane3f &plane, const Vec3f &p0, const Vec3f &p1)
bool areOnSameSide (const Plane3f &plane, const Vec3f &p0, const Vec3f &p1)
float signedDistance (const Plane3f &pl, const Vec3f &p)
float distance (const Plane3f &pl, const Vec3f &p)
Vec3f nearestPoint (const Plane3f &pl, const Vec3f &p)

Detailed Description

Plane class.


Constructor & Destructor Documentation

nvmath::Plane3f::Plane3f void   )  [inline]
 

Default constructor.

For performance reasons no initialization is performed.

nvmath::Plane3f::Plane3f const Vec3f n,
float  c
[inline]
 

Constructor by normal and offset.

Parameters:
n  normal
c  offset

nvmath::Plane3f::Plane3f const Vec3f n,
const Vec3f p
[inline]
 

Constructor by normal and point on plane.

Parameters:
n  normal
p  point in plane

nvmath::Plane3f::Plane3f const Vec3f p0,
const Vec3f p1,
const Vec3f p2
[inline]
 

Constructor by three points.

Parameters:
p0  first point
p1  second point
p2  third point


Member Function Documentation

Plane3f nvmath::Plane3f::operator- void   )  const [inline]
 

Negation operator.

Returns:
complementary plane (with reversed normal).

Plane3f & nvmath::Plane3f::operator= const Plane3f pl  )  [inline]
 

Assignment operator.

Returns:
reference to the assigned plane
Parameters:
pl  plane to assign

bool nvmath::Plane3f::operator== const Plane3f pl  )  const [inline]
 

Equality operator.

Returns:
true if the plane is equal to pl, otherwise false
Parameters:
pl  plane to compare with

bool nvmath::Plane3f::operator!= const Plane3f pl  )  const [inline]
 

Inequality operator.

Returns:
true if the plane is not equal to pl, otherwise false
Parameters:
pl  plane to compare with

NVSG_API float nvmath::Plane3f::operator() const Vec3f p  )  const
 

Calling operator.

Returns:
the signed distance of p to the plane.
Parameters:
p  point to determine distance from plane

Vec3f & nvmath::Plane3f::n void   )  [inline]
 

Non-constant access to the plane normal.

Returns:
reference to the plane normal.

const Vec3f & nvmath::Plane3f::n void   )  const [inline]
 

Constant access to the plane normal.

Returns:
constant reference to the plane normal.

float & nvmath::Plane3f::c void   )  [inline]
 

Non-constant access to the plane offset.

Returns:
reference to the plane offset.

const float & nvmath::Plane3f::c void   )  const [inline]
 

Constant access to the plane offset.

Returns:
constant reference to the plane offset.


Friends And Related Function Documentation

bool areOnOppositeSides const Plane3f plane,
const Vec3f p0,
const Vec3f p1
[related]
 

Determine if two points are on opposite sides of a plane.

Returns:
true, if p0 and p1 are on opposite sides of plane.
Parameters:
plane  plane to use
p0  first point
p1  second point

bool areOnSameSide const Plane3f plane,
const Vec3f p0,
const Vec3f p1
[related]
 

Determine if two points are on the same side of a plane.

Returns:
true, if p0 and p1 are on the same side of plane.
Parameters:
plane  plane to use
p0  first point
p1  second point

float signedDistance const Plane3f pl,
const Vec3f p
[related]
 

Determine signed distance between the Plane pl and the Point p.

Returns:
signed distance between pl and p.
Parameters:
pl  plane
p  point

float distance const Plane3f pl,
const Vec3f p
[related]
 

Determine distance between the Plane pl and the Point p.

Returns:
distance between pl and p.
Parameters:
pl  plane
p  point

Vec3f nearestPoint const Plane3f pl,
const Vec3f p
[related]
 

Determine the point on the plane pl nearest to the point p.

Returns:
the point on the plane pl nearest to the point p.
Parameters:
pl  plane
p  point


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:39 2005 for NVSGSDK by NVIDIA