CSGXCylinder creates an internal representation of a Constructive Solid Geometry (CSG) x-axis aligned cylinder, represented in the following form (y - y0)^2 + (z - z0)^2 = r^2. More...
#include <CSGXCylinder.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 | |
| CSGXCylinder (const std::string &name, const Real y0, const Real z0, const Real r) | |
| Construct a cylinder surface aligned with the x axis. More... | |
| virtual | ~CSGXCylinder ()=default |
| Destructor. More... | |
| virtual std::unordered_map< std::string, Real > | getCoeffs () const override |
| Get the coefficients (y0, z0, and r) that define the cylindrical surface with the equation: (y - y0)^2 + (z - z0)^2 = r^2. More... | |
| virtual Real | evaluateSurfaceEquationAtPoint (const Point &p) const override |
| given a point, determine its evaluation based on the equation of the cylinder 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 | checkRadius () const |
| void | setName (const std::string &name) |
| FRIEND_TEST (CSGSurfaceTest, testSetName) | |
| Friends for unit testing. More... | |
Protected Attributes | |
| Real | _y0 |
| Value of y0 in equation of an x-axis aligned cylinder. More... | |
| Real | _z0 |
| Value of z0 in equation of an x-axis aligned cylinder. More... | |
| Real | _r |
| Value of r in equation of an x-axis aligned cylinder. 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... | |
CSGXCylinder creates an internal representation of a Constructive Solid Geometry (CSG) x-axis aligned cylinder, represented in the following form (y - y0)^2 + (z - z0)^2 = r^2.
Definition at line 23 of file CSGXCylinder.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::CSGXCylinder::CSGXCylinder | ( | const std::string & | name, |
| const Real | y0, | ||
| const Real | z0, | ||
| const Real | r | ||
| ) |
Construct a cylinder surface aligned with the x axis.
| name | unique name of surface |
| y0 | y coordinate of center |
| z0 | z coordinate of center |
| r | radius |
Definition at line 15 of file CSGXCylinder.C.
|
virtualdefault |
Destructor.
|
protected |
Definition at line 39 of file CSGXCylinder.C.
Referenced by CSGXCylinder().
|
overridevirtual |
given a point, determine its evaluation based on the equation of the cylinder
| p | point |
Implements CSG::CSGSurface.
Definition at line 29 of file CSGXCylinder.C.
|
protectedinherited |
Friends for unit testing.
|
overridevirtual |
Get the coefficients (y0, z0, and r) that define the cylindrical surface with the equation: (y - y0)^2 + (z - z0)^2 = r^2.
Implements CSG::CSGSurface.
Definition at line 22 of file CSGXCylinder.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.
|
protectedinherited |
Name of surface.
Definition at line 109 of file CSGSurface.h.
Referenced by CSG::CSGSurface::getHalfspaceFromPoint(), CSG::CSGSurface::getName(), and CSG::CSGSurface::setName().
|
protected |
Value of r in equation of an x-axis aligned cylinder.
Definition at line 68 of file CSGXCylinder.h.
Referenced by checkRadius(), evaluateSurfaceEquationAtPoint(), and getCoeffs().
|
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().
|
protected |
Value of y0 in equation of an x-axis aligned cylinder.
Definition at line 62 of file CSGXCylinder.h.
Referenced by evaluateSurfaceEquationAtPoint(), and getCoeffs().
|
protected |
Value of z0 in equation of an x-axis aligned cylinder.
Definition at line 65 of file CSGXCylinder.h.
Referenced by evaluateSurfaceEquationAtPoint(), and getCoeffs().
1.8.14