Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Opcode::Plane Class Reference

#include <Opcode.h>

Public Member Functions

inline_ Plane ()
 Constructor. More...
 
inline_ Plane (float nx, float ny, float nz, float d)
 Constructor from a normal and a distance. More...
 
inline_ Plane (const Point &p, const Point &n)
 Constructor from a point on the plane and a normal. More...
 
inline_ Plane (const Point &p0, const Point &p1, const Point &p2)
 Constructor from three points. More...
 
inline_ Plane (const Point &_n, float _d)
 Constructor from a normal and a distance. More...
 
inline_ Plane (const Plane &plane)
 Copy constructor. More...
 
inline_ ~Plane ()
 Destructor. More...
 
inline_ PlaneZero ()
 
inline_ PlaneSet (float nx, float ny, float nz, float _d)
 
inline_ PlaneSet (const Point &p, const Point &_n)
 
PlaneSet (const Point &p0, const Point &p1, const Point &p2)
 
inline_ float Distance (const Point &p) const
 
inline_ bool Belongs (const Point &p) const
 
inline_ void Normalize ()
 
inline_ operator Point () const
 
inline_ operator HPoint () const
 
inline_ Plane operator* (const Matrix4x4 &m) const
 
inline_ Planeoperator*= (const Matrix4x4 &m)
 

Public Attributes

Point n
 The normal to the plane. More...
 
float d
 The distance from the origin. More...
 

Detailed Description

Definition at line 18 of file Opcode.h.

Constructor & Destructor Documentation

inline_ Opcode::Plane::Plane ( )
inline

Constructor.

Definition at line 22 of file Opcode.h.

39 {
inline_ Opcode::Plane::Plane ( float  nx,
float  ny,
float  nz,
float  d 
)
inline

Constructor from a normal and a distance.

Definition at line 24 of file Opcode.h.

39 {
inline_ Opcode::Plane::Plane ( const Point p,
const Point n 
)
inline

Constructor from a point on the plane and a normal.

Definition at line 26 of file Opcode.h.

39 {
inline_ Opcode::Plane::Plane ( const Point p0,
const Point p1,
const Point p2 
)
inline

Constructor from three points.

Definition at line 28 of file Opcode.h.

39 {
inline_ Opcode::Plane::Plane ( const Point _n,
float  _d 
)
inline

Constructor from a normal and a distance.

Definition at line 30 of file Opcode.h.

39 {
inline_ Opcode::Plane::Plane ( const Plane plane)
inline

Copy constructor.

Definition at line 32 of file Opcode.h.

39 {
inline_ Opcode::Plane::~Plane ( )
inline

Destructor.

Definition at line 34 of file Opcode.h.

39 {

Member Function Documentation

inline_ bool Opcode::Plane::Belongs ( const Point p) const
inline

Definition at line 42 of file Opcode.h.

inline_ float Opcode::Plane::Distance ( const Point p) const
inline

Definition at line 41 of file Opcode.h.

Referenced by VPlaneSideEps().

inline_ void Opcode::Plane::Normalize ( )
inline

Definition at line 44 of file Opcode.h.

inline_ Opcode::Plane::operator HPoint ( ) const
inline

Definition at line 59 of file Opcode.h.

inline_ Opcode::Plane::operator Point ( ) const
inline

Definition at line 58 of file Opcode.h.

inline_ Plane Opcode::Plane::operator* ( const Matrix4x4 m) const
inline

Definition at line 62 of file Opcode.h.

inline_ Plane& Opcode::Plane::operator*= ( const Matrix4x4 m)
inline

Definition at line 69 of file Opcode.h.

inline_ Plane& Opcode::Plane::Set ( float  nx,
float  ny,
float  nz,
float  _d 
)
inline

Definition at line 37 of file Opcode.h.

39 {
inline_ Plane& Opcode::Plane::Set ( const Point p,
const Point _n 
)
inline

Definition at line 38 of file Opcode.h.

39 {
Plane & Plane::Set ( const Point p0,
const Point p1,
const Point p2 
)

Computes the plane equation from 3 points.

Parameters
p0[in] first point
p1[in] second point
p2[in] third point
Returns
Self-reference

Definition at line 34 of file IcePlane.cpp.

35 {
36  Point Edge0 = p1 - p0;
37  Point Edge1 = p2 - p0;
38 
39  n = Edge0 ^ Edge1;
40  n.Normalize();
41 
42  d = -(p0 | n);
43 
44  return *this;
45 }
inline_ Plane& Opcode::Plane::Zero ( )
inline

Definition at line 36 of file Opcode.h.

39 {

Member Data Documentation

float Opcode::Plane::d

The distance from the origin.

Definition at line 55 of file Opcode.h.

Referenced by Opcode::Point::ProjectToPlane().

Point Opcode::Plane::n

The normal to the plane.

Definition at line 54 of file Opcode.h.

Referenced by Opcode::Point::ProjectToPlane().


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