Jet
v1.3.3
|
3-D sphere geometry. More...
#include <jet/sphere3.h>
Classes | |
class | Builder |
Front-end to create Sphere3 objects step by step. More... | |
Public Member Functions | |
Sphere3 (const Transform3 &transform=Transform3(), bool isNormalFlipped=false) | |
Constructs a sphere with center at (0, 0, 0) and radius of 1. More... | |
Sphere3 (const Vector3D ¢er, double radius, const Transform3 &transform=Transform3(), bool isNormalFlipped=false) | |
Constructs a sphere with center and radius . More... | |
Sphere3 (const Sphere3 &other) | |
Copy constructor. More... | |
Public Member Functions inherited from jet::Surface3 | |
Surface3 (const Transform3 &transform=Transform3(), bool isNormalFlipped=false) | |
Constructs a surface with normal direction. More... | |
Surface3 (const Surface3 &other) | |
Copy constructor. More... | |
virtual | ~Surface3 () |
Default destructor. More... | |
Vector3D | closestPoint (const Vector3D &otherPoint) const |
BoundingBox3D | boundingBox () const |
Returns the bounding box of this surface object. More... | |
bool | intersects (const Ray3D &ray) const |
Returns true if the given ray intersects with this surface object. More... | |
double | closestDistance (const Vector3D &otherPoint) const |
SurfaceRayIntersection3 | closestIntersection (const Ray3D &ray) const |
Returns the closest intersection point for given ray . More... | |
Vector3D | closestNormal (const Vector3D &otherPoint) const |
virtual void | updateQueryEngine () |
Updates internal spatial query engine. More... | |
virtual bool | isBounded () const |
Returns true if bounding box can be defined. More... | |
virtual bool | isValidGeometry () const |
Returns true if the surface is a valid geometry. More... | |
bool | isInside (const Vector3D &otherPoint) const |
Static Public Member Functions | |
static Builder | builder () |
Returns builder fox Sphere3. More... | |
Public Attributes | |
Vector3D | center |
Center of the sphere. More... | |
double | radius = 1.0 |
Radius of the sphere. More... | |
Public Attributes inherited from jet::Surface3 | |
Transform3 | transform |
Local-to-world transform. More... | |
bool | isNormalFlipped = false |
Flips normal when calling Surface3::closestNormal(...). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from jet::Surface3 | |
virtual bool | isInsideLocal (const Vector3D &otherPoint) const |
3-D sphere geometry.
This class represents 3-D sphere geometry which extends Surface3 by overriding surface-related queries.
jet::Sphere3::Sphere3 | ( | const Transform3 & | transform = Transform3() , |
bool | isNormalFlipped = false |
||
) |
Constructs a sphere with center at (0, 0, 0) and radius of 1.
jet::Sphere3::Sphere3 | ( | const Vector3D & | center, |
double | radius, | ||
const Transform3 & | transform = Transform3() , |
||
bool | isNormalFlipped = false |
||
) |
Constructs a sphere with center
and radius
.
jet::Sphere3::Sphere3 | ( | const Sphere3 & | other | ) |
Copy constructor.
Vector3D jet::Sphere3::center |
Center of the sphere.
double jet::Sphere3::radius = 1.0 |
Radius of the sphere.