The Nebula Device 3: Math::plane Class Reference

The Nebula Device 3

Math::plane Class Reference

#include <xna_plane.h>


Detailed Description

Nebula's plane class.

(C) 2007 RadonLabs GmbH

Public Member Functions

 plane ()
 default constructor, NOTE: does NOT setup componenets!
 plane (scalar a, scalar b, scalar c, scalar d)
 construct from components
 plane (const float4 &p0, const float4 &p1, const float4 &p2)
 construct from points
 plane (const float4 &p, const float4 &n)
 construct from point and normal
 plane (XMVECTOR rhs)
 construct from XMVECTOR
void setup_from_points (const float4 &p0, const float4 &p1, const float4 &p2)
 setup from points
void setup_from_point_and_normal (const float4 &p, const float4 &n)
 setup from point and normal
void set (scalar a, scalar b, scalar c, scalar d)
 set componenets
void set_a (scalar a)
 set the x component
void set_b (scalar b)
 set the y component
void set_c (scalar c)
 set the z component
void set_d (scalar d)
 set the w component
scalar & a ()
 read/write access to A component
scalar & b ()
 read/write access to B component
scalar & c ()
 read/write access to C component
scalar & d ()
 read/write access to D component
scalar a () const
 read-only access to A component
scalar b () const
 read-only access to B component
scalar c () const
 read-only access to C component
scalar d () const
 read-only access to D component
scalar dot (const float4 &v) const
 compute dot product of plane and vector
bool intersectline (const float4 &startPoint, const float4 &endPoint, float4 &outIntersectPoint) const
 find intersection with line
ClipStatus::Type clip (const line &l, line &outClippedLine) const
 clip line against this plane

Static Public Member Functions

static plane normalize (const plane &p)
 normalize plane components a,b,c
static __declspec (deprecated) plane transform(__PlaneArg p
 transform plane by inverse transpose of transform

Constructor & Destructor Documentation

Math::plane::plane ( scalar  a,
scalar  b,
scalar  c,
scalar  d 
) [inline]

construct from components

!!!! copy constructor forbidden, otherwise passing plane's to a function !!!! via Registers doesnt work