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
IcePlane.h File Reference

Go to the source code of this file.

Classes

class  Plane
 

Macros

#define PLANE_EPSILON   (1.0e-7f)
 
#define __ICEPLANE_H__
 
#define PLANE_EPSILON   (1.0e-7f)
 

Functions

inline_ void TransformPlane (Plane &transformed, const Plane &plane, const Matrix4x4 &transform)
 
inline_ void TransformPlane (Plane &plane, const Matrix4x4 &transform)
 

Detailed Description

Contains code for planes.

Author
Pierre Terdiman
Date
April, 4, 2000

Definition in file IcePlane.h.

Macro Definition Documentation

#define __ICEPLANE_H__

Definition at line 14 of file Opcode.h.

#define PLANE_EPSILON   (1.0e-7f)
#define PLANE_EPSILON   (1.0e-7f)

Definition at line 16 of file Opcode.h.

Referenced by Plane::Belongs().

Function Documentation

inline_ void TransformPlane ( Plane transformed,
const Plane plane,
const Matrix4x4 transform 
)

Transforms a plane by a 4x4 matrix. Same as Plane * Matrix4x4 operator, but faster.

Parameters
transformed[out] transformed plane
plane[in] source plane
transform[in] transform matrix
Warning
the plane normal must be unit-length

Definition at line 87 of file IcePlane.h.

88  {
89  // Rotate the normal using the rotation part of the 4x4 matrix
90  transformed.n = plane.n * Matrix3x3(transform);
91 
92  // Compute new d
93  transformed.d = plane.d - (Point(transform.GetTrans())|transformed.n);
94  }
inline_ void TransformPlane ( Plane plane,
const Matrix4x4 transform 
)

Transforms a plane by a 4x4 matrix. Same as Plane * Matrix4x4 operator, but faster.

Parameters
plane[in/out] source plane (transformed on return)
transform[in] transform matrix
Warning
the plane normal must be unit-length

Definition at line 104 of file IcePlane.h.

105  {
106  // Rotate the normal using the rotation part of the 4x4 matrix
107  plane.n *= Matrix3x3(transform);
108 
109  // Compute new d
110  plane.d -= Point(transform.GetTrans())|plane.n;
111  }