[SML Overview]

# class SMLPlane: public SMLVec4f

    #include "smlmath.h"

SMLPlane inherits SMLVec4f class and has no new component data. Vector components x, y, z define normal to the plane and plane equation as (x, y, z) (Px, Py, Pz) + w = 0, where P is any point on the plane.

### Public Interface

constructors | operator= | Distance

SMLLIBENTRY SMLPlane(float a, float b, float c, float d);

#### Discussion

SMLPlane object constructor. Creates plane with normal (a, b, c) and plane value d.

#### Parameters

a, b, c, d - variables of float type.

[top]

SMLLIBENTRY SMLPlane(float v[]);

#### Discussion

SMLPlane object constructor. Calls constructor of base SMLVec4f class with parameter v, which is a pointer to array of float type.

#### Parameters

v - pointer to float-type array. The array must have at least four elements.

[top]

SMLLIBENTRY SMLPlane(const SMLPlane& v);

#### Discussion

SMLPlane object copy-constructor. Method sets coordinates of this plane equal to those of plane v.

#### Parameters

v - reference to SMLPlane-type object.

[top]

SMLLIBENTRY SMLPlane();

#### Discussion

Default SMLPlane object constructor. Sets all class members to 0.

#### Parameters

No.

[top]

SMLLIBENTRY const SMLPlane& operator=(const SMLPlane& plane);

#### Discussion

Method is an overloaded operator-function. It sets all values for this plane to be equal to those of object plane.

#### Parameters

plane - reference to object of SMLPlane type whose data are assigned to this plane.

#### Return Value

Returns reference to this object.

[top]

SMLLIBENTRY float Distance(const SMLVec3f& vec) const;

#### Discussion

Method computes distance from this plane to point vec. It is positive, if vec lays in positive half-space of this plane, equal to 0, if point is on the plane, and negative otherwise.

#### Parameters

vec - Reference to object of SMLVec3f type.

#### Return Value

Distance from this plane to point vec.

[top]