#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.
SMLLIBENTRY SMLPlane(float a, float b, float c, float d);
SMLPlane object constructor. Creates plane with normal (a, b, c) and plane value d.
a, b, c, d - variables of float type.
[top]
SMLLIBENTRY SMLPlane(float v[]);
SMLPlane object constructor. Calls constructor of base SMLVec4f class with parameter v, which is a pointer to array of float type.
v - pointer to float-type array. The array must have at least four elements.
[top]
SMLLIBENTRY SMLPlane(const SMLPlane& v);
SMLPlane object copy-constructor. Method sets coordinates of this plane equal to those of plane v.
v - reference to SMLPlane-type object.
[top]
SMLLIBENTRY SMLPlane();
Default SMLPlane object constructor. Sets all class members to 0.
No.
[top]
SMLLIBENTRY const SMLPlane& operator=(const SMLPlane& plane);
Method is an overloaded operator-function. It sets all values for this plane to be equal to those of object plane.
plane - reference to object of SMLPlane type whose data are assigned to this plane.
Returns reference to this object.
[top]
SMLLIBENTRY float Distance(const SMLVec3f& vec) const;
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.
vec - Reference to object of SMLVec3f type.
Distance from this plane to point vec.
[top]