Cylinder class. More...
#include <cylinder3.h>
Public Member Functions | |
Cylinder3 () | |
Cylinder3 (const Line3 &axis, const Scalar &radius) | |
bool | operator== (const Cylinder3 &c) const |
bool | operator!= (const Cylinder3 &c) const |
Point3 | project (const Point3 &p) const |
Projects point p on current cylinder. | |
Scalar | distance (const Point3 &p) const |
Line3 | getAxis () const |
Line3 & | getAxisRef () |
const Line3 & | getAxisRef () const |
Scalar | getRadius () const |
Scalar & | getRadiusRef () |
const Scalar & | getRadiusRef () const |
void | setAxis (const Line3 &axis) |
void | setRadius (const Scalar &radius) |
void | setValue (const Line3 &axis, const Scalar &radius) |
bool | isSingular () const |
Returns true if cylinder has null radius. |
Cylinder class.
This class represents a cylinder with circular cross-section of infinite length.
Cylinders are represented by a line (axis) and a radius. A point belongs to the cylinder
if
, where
and
represent the cylinder axis and radius, respectively.
|
inline |
Default constructor. Creates a cylinder with unit radius along the z axis.
|
inline |
Axis and radius constructor. Since the radius must be a positive value, its absolute value is taken (just in case) without issuing warnings or errors.
|
inline |
Signed distance from point p to current cylinder.
Positive distance -> Point lies outside the cylinder. Null distance -> Point is contained in cylinder. Negative distance -> Point lies inside the cylinder.
|
inline |
Sets cylinder radius. Since the radius must be a positive value, its absolute value is taken (just in case) without issuing warnings or errors.
|
inline |
Sets cylinder parameters. Since the radius must be a positive value, its absolute value is taken (just in case) without issuing warnings or errors.