CSGPlane creates an internal representation of a Constructive Solid Geometry (CSG) plane, represented in the form aX + bY + cZ = d. More...
#include <CSGPlane.h>
Public Types | |
| enum | Halfspace { Halfspace::POSITIVE, Halfspace::NEGATIVE } |
| Enum for the sign of the half-space being represented by a point and surface. More... | |
Public Member Functions | |
| CSGPlane (const std::string &name, const Point &p1, const Point &p2, const Point &p3) | |
| Construct a new CSGPlane surface from three non co-linear points. More... | |
| CSGPlane (const std::string &name, const Real a, const Real b, const Real c, const Real d) | |
| Construct a new CSGPlane surface from coefficients (a, b, c, d) for the equation of a plane: aX + bY + cZ = d. More... | |
| virtual | ~CSGPlane ()=default |
| Destructor. More... | |
| virtual std::unordered_map< std::string, Real > | getCoeffs () const override |
| get coefficients (a, b, c, d) of the Plane aX + bY + cZ = d More... | |
| virtual Real | evaluateSurfaceEquationAtPoint (const Point &p) const override |
| given a point, determine its evaluation based on the equation of the plane More... | |
| const std::string & | getSurfaceType () const |
| Get the Surface Type. More... | |
| CSGSurface::Halfspace | getHalfspaceFromPoint (const Point &p) const |
| given a point, determine if it is in the positive or negative half-space for the surface More... | |
| const std::string & | getName () const |
| Get the name of surface. More... | |
| bool | operator== (const CSGSurface &other) const |
| Operator overload for checking if two CSGSurface objects are equal. More... | |
| bool | operator!= (const CSGSurface &other) const |
| Operator overload for checking if two CSGSurface objects are not equal. More... | |
Protected Member Functions | |
| void | coeffsFromPoints (const Point &p1, const Point &p2, const Point &p3) |
| void | setName (const std::string &name) |
| FRIEND_TEST (CSGSurfaceTest, testSetName) | |
| Friends for unit testing. More... | |
Protected Attributes | |
| Real | _a |
| Value of a in equation of plane. More... | |
| Real | _b |
| Value of b in equation of plane. More... | |
| Real | _c |
| Value of c in equation of plane. More... | |
| Real | _d |
| Value of d in equation of plane. More... | |
| std::string | _name |
| Name of surface. More... | |
| const std::string | _surface_type |
| Type of surface that is being represented string is taken directly from the surface class name. More... | |
CSGPlane creates an internal representation of a Constructive Solid Geometry (CSG) plane, represented in the form aX + bY + cZ = d.
Definition at line 23 of file CSGPlane.h.
|
stronginherited |
Enum for the sign of the half-space being represented by a point and surface.
| Enumerator | |
|---|---|
| POSITIVE | |
| NEGATIVE | |
Definition at line 30 of file CSGSurface.h.
| CSG::CSGPlane::CSGPlane | ( | const std::string & | name, |
| const Point & | p1, | ||
| const Point & | p2, | ||
| const Point & | p3 | ||
| ) |
Construct a new CSGPlane surface from three non co-linear points.
| name | unique name of plane |
| p1 | point 1 |
| p2 | point 2 |
| p3 | point 3 |
Definition at line 15 of file CSGPlane.C.
| CSG::CSGPlane::CSGPlane | ( | const std::string & | name, |
| const Real | a, | ||
| const Real | b, | ||
| const Real | c, | ||
| const Real | d | ||
| ) |
Construct a new CSGPlane surface from coefficients (a, b, c, d) for the equation of a plane: aX + bY + cZ = d.
| name | unique name of plane |
| a | coefficient a |
| b | coefficient b |
| c | coefficient c |
| d | coefficient d |
Definition at line 21 of file CSGPlane.C.
|
virtualdefault |
Destructor.
|
protected |
Definition at line 34 of file CSGPlane.C.
Referenced by CSGPlane().
|
overridevirtual |
given a point, determine its evaluation based on the equation of the plane
| p | point |
Implements CSG::CSGSurface.
Definition at line 53 of file CSGPlane.C.
|
protectedinherited |
Friends for unit testing.
|
overridevirtual |
get coefficients (a, b, c, d) of the Plane aX + bY + cZ = d
Implements CSG::CSGSurface.
Definition at line 27 of file CSGPlane.C.
|
inherited |
given a point, determine if it is in the positive or negative half-space for the surface
| p | point |
Definition at line 21 of file CSGSurface.C.
|
inlineinherited |
Get the name of surface.
Definition at line 95 of file CSGSurface.h.
Referenced by CSG::CSGSurfaceList::addSurface(), CSG::CSGRegion::CSGRegion(), CSG::CSGSurface::operator==(), and CSG::CSGSurfaceList::renameSurface().
|
inlineinherited |
Get the Surface Type.
Definition at line 61 of file CSGSurface.h.
Referenced by CSG::CSGSurface::operator==().
|
inherited |
Operator overload for checking if two CSGSurface objects are not equal.
Definition at line 45 of file CSGSurface.C.
|
inherited |
Operator overload for checking if two CSGSurface objects are equal.
Definition at line 37 of file CSGSurface.C.
|
inlineprotectedinherited |
Definition at line 106 of file CSGSurface.h.
|
protected |
Value of a in equation of plane.
Definition at line 74 of file CSGPlane.h.
Referenced by coeffsFromPoints(), evaluateSurfaceEquationAtPoint(), and getCoeffs().
|
protected |
Value of b in equation of plane.
Definition at line 77 of file CSGPlane.h.
Referenced by coeffsFromPoints(), evaluateSurfaceEquationAtPoint(), and getCoeffs().
|
protected |
Value of c in equation of plane.
Definition at line 80 of file CSGPlane.h.
Referenced by coeffsFromPoints(), evaluateSurfaceEquationAtPoint(), and getCoeffs().
|
protected |
Value of d in equation of plane.
Definition at line 83 of file CSGPlane.h.
Referenced by coeffsFromPoints(), evaluateSurfaceEquationAtPoint(), and getCoeffs().
|
protectedinherited |
Name of surface.
Definition at line 109 of file CSGSurface.h.
Referenced by CSG::CSGSurface::getHalfspaceFromPoint(), CSG::CSGSurface::getName(), and CSG::CSGSurface::setName().
|
protectedinherited |
Type of surface that is being represented string is taken directly from the surface class name.
Definition at line 113 of file CSGSurface.h.
Referenced by CSG::CSGSurface::getSurfaceType().
1.8.14