HPlane

class HPlane

The HPlane class is the data type of a plane.

The HPlane class encapsulates the a, b, c and d parameters of the plane equation.

Methods

HPlane::HPlane(float const A = 0, float const B = 1, float const C = 0, float const D = 0)
HPlane::HPlane(HVector const &normal, float const D)
HPlane::HPlane(HPlane const &p)
void HPlane::Set(float A, float B, float C, float D)

This method sets an HPlane object with parameter values.

double HPlane::ClassifyPoint(HPoint const &p) const

const

This method determines if given point is infront of or behind the plane.

Returns

A positive value if the point is in front of the plane or a negative value if the point is behind the plane. If the value is 0, the point is on the plane.
void HPlane::CalculateNormal(HPoint &normal) const

const

This method returns a perpendicular plane vector.

Parameters

normal: Pass by reference. The method returns the value for a normalized vector that is perpendicular to the plane.
bool HPlane::Equal(HPlane const *p, float epsi1 = HPOINT_EPSILON, float epsi2 = HPOINT_EPSILON) const

const

This method checks if the xyz components of the point are equal.

float HPlane::a() const

const

float HPlane::b() const

const

float HPlane::c() const

const

float HPlane::d() const

const

void HPlane::a(float A)
void HPlane::b(float B)
void HPlane::c(float C)
void HPlane::d(float D)

Variables

float HPlane::m_a

private

float

The a-parameter of the plane equation.

float HPlane::m_b

private

float

The b-parameter of the plane equation.

float HPlane::m_c

private

float

The c-parameter of the plane equation.

float HPlane::m_d

private

float

The d-parameter of the plane equation.