Jet
v1.3.3
|
2-D sphere geometry. More...
#include <jet/sphere2.h>
Classes | |
class | Builder |
Front-end to create Sphere2 objects step by step. More... | |
Public Member Functions | |
Sphere2 (const Transform2 &transform=Transform2(), bool isNormalFlipped=false) | |
Constructs a sphere with center at (0, 0) and radius of 1. More... | |
Sphere2 (const Vector2D ¢er, double radius, const Transform2 &transform=Transform2(), bool isNormalFlipped=false) | |
Constructs a sphere with center and radius . More... | |
Sphere2 (const Sphere2 &other) | |
Copy constructor. More... | |
![]() | |
Surface2 (const Transform2 &transform=Transform2(), bool isNormalFlipped=false) | |
Constructs a surface with normal direction. More... | |
Surface2 (const Surface2 &other) | |
Copy constructor. More... | |
virtual | ~Surface2 () |
Default destructor. More... | |
Vector2D | closestPoint (const Vector2D &otherPoint) const |
BoundingBox2D | boundingBox () const |
Returns the bounding box of this surface object. More... | |
bool | intersects (const Ray2D &ray) const |
Returns true if the given ray intersects with this surface object. More... | |
double | closestDistance (const Vector2D &otherPoint) const |
SurfaceRayIntersection2 | closestIntersection (const Ray2D &ray) const |
Returns the closest intersection point for given ray . More... | |
Vector2D | closestNormal (const Vector2D &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 Vector2D &otherPoint) const |
Static Public Member Functions | |
static Builder | builder () |
Returns builder fox Sphere2. More... | |
Public Attributes | |
Vector2D | center |
Center of the sphere. More... | |
double | radius = 1.0 |
Radius of the sphere. More... | |
![]() | |
Transform2 | transform |
Local-to-world transform. More... | |
bool | isNormalFlipped = false |
Flips normal. More... | |
Additional Inherited Members | |
![]() | |
virtual bool | isInsideLocal (const Vector2D &otherPoint) const |
2-D sphere geometry.
This class represents 2-D sphere geometry which extends Surface2 by overriding surface-related queries.
jet::Sphere2::Sphere2 | ( | const Transform2 & | transform = Transform2() , |
bool | isNormalFlipped = false |
||
) |
Constructs a sphere with center at (0, 0) and radius of 1.
jet::Sphere2::Sphere2 | ( | const Vector2D & | center, |
double | radius, | ||
const Transform2 & | transform = Transform2() , |
||
bool | isNormalFlipped = false |
||
) |
Constructs a sphere with center
and radius
.
jet::Sphere2::Sphere2 | ( | const Sphere2 & | other | ) |
Copy constructor.
Vector2D jet::Sphere2::center |
Center of the sphere.
double jet::Sphere2::radius = 1.0 |
Radius of the sphere.