AMCAX Kernel 1.0.0.0
AMCAX::Sphere Class Reference

Class of sphere. More...

#include <math/Sphere.hpp>

Inheritance diagram for AMCAX::Sphere:
Collaboration diagram for AMCAX::Sphere:

Public Member Functions

 Sphere ()=default
 Default constructor.
 
AMCAX_API Sphere (const Frame3 &frame, double r)
 Construct from a local frame and a radius. More...
 
AMCAX_API void SetRadius (double r)
 Set the radius. More...
 
AMCAX_API void UReverse ()
 Reverse the u parameter.
 
AMCAX_API void VReverse ()
 Reverse the v parameter.
 
AMCAX_API double Area () const
 Get the area of the sphere. More...
 
AMCAX_API void Coefficients (double &a1, double &a2, double &a3, double &b1, double &b2, double &b3, double &c1, double &c2, double &c3, double &d) const
 Get the coefficients of the algebraic representation of the sphere. More...
 
AMCAX_API double Radius () const
 Get the radius. More...
 
AMCAX_API double Volume () const
 Get the volume of the ball bounded by the sphere. More...
 
AMCAX_API SphereScale (const Point3 &point, double scale)
 Scale the sphere by a point. More...
 
AMCAX_API SphereTransform (const Transformation3 &tr)
 Transform the sphere. More...
 
- Public Member Functions inherited from AMCAX::SurfaceBase< Sphere >
void SetLocation (const Point3 &p)
 Set the location. More...
 
void SetPosition (const Frame3 &frame)
 Set the local frame. More...
 
void SetAxis (const Axis3 &axis)
 Set the main axis (normal axis) of the local frame in 3D. More...
 
Axis3 Axis () const
 Get the main axis (normal axis) More...
 
const Point3Location () const
 Get the location point. More...
 
const Frame3Position () const
 Get the local frame. More...
 
Axis3 XAxis () const
 Get the x axis. More...
 
Axis3 YAxis () const
 Get the y axis. More...
 
bool IsDirect () const
 Determine whether the local frame is right-handed or not. More...
 
SphereMirror (const Point3 &p)
 Mirror the surface by a point. More...
 
SphereMirror (const Axis3 &axis)
 Mirror the surface by an axis. More...
 
SphereMirror (const Frame3 &frame)
 Mirror the surface by a frame. More...
 
Sphere Mirrored (const Point3 &p) const
 Get the surface mirrored by a point. More...
 
Sphere Mirrored (const Axis3 &axis) const
 Get the surface mirrored by an axis. More...
 
Sphere Mirrored (const Frame3 &frame) const
 Get the surface mirrored by a frame. More...
 
SphereRotate (const Axis3 &axis, double angle)
 Rotate the surface around an axis with an angle in 3D. More...
 
Sphere Rotated (const Axis3 &axis, double angle) const
 Get the surface rotated around an axis with an angle in 3D. More...
 
SphereScale (const Point3 &point, double scale)
 Scale the surface by a center point. More...
 
Sphere Scaled (const Point3 &point, double scale) const
 Get the surface scaled by a center point. More...
 
SphereTransform (const Transformation3 &tr)
 Transform the surface. More...
 
Sphere Transformed (const Transformation3 &tr) const
 Get the transformed surface. More...
 
SphereTranslate (const Vector3 &vec)
 Translate the surface by a vector. More...
 
SphereTranslate (const Point3 &p1, const Point3 &p2)
 Translate the surface by a vector from a source point to a target point. More...
 
Sphere Translated (const Vector3 &vec) const
 Get the surface translated by a vector. More...
 
Sphere Translated (const Point3 &p1, const Point3 &p2) const
 Get the surface translated by a vector from a source point to a target point. More...
 

Additional Inherited Members

- Protected Member Functions inherited from AMCAX::SurfaceBase< Sphere >
 SurfaceBase ()=default
 Default constructor.
 
 SurfaceBase (const Frame3 &frame)
 Construct from a frame. More...
 
Sphere_derived ()
 Cast to derived class. More...
 
const Sphere_derived () const
 Cast to derived class. More...
 
- Protected Attributes inherited from AMCAX::SurfaceBase< Sphere >
Frame3 pos
 The local coordinate system.
 

Detailed Description

Class of sphere.

Constructor & Destructor Documentation

◆ Sphere()

AMCAX_API AMCAX::Sphere::Sphere ( const Frame3 frame,
double  r 
)

Construct from a local frame and a radius.

Parameters
frameThe local frame
rThe radius

Member Function Documentation

◆ Area()

AMCAX_API double AMCAX::Sphere::Area ( ) const

Get the area of the sphere.

Returns
The area of the sphere

◆ Coefficients()

AMCAX_API void AMCAX::Sphere::Coefficients ( double &  a1,
double &  a2,
double &  a3,
double &  b1,
double &  b2,
double &  b3,
double &  c1,
double &  c2,
double &  c3,
double &  d 
) const

Get the coefficients of the algebraic representation of the sphere.

The algebraic representation of the sphere is a_1 x^2 + a_2 y^2 + a_3 z^2 + 2 (b_1 xy + b_2 xz + b_3 yz) + 2 (c_1 x + c_2 y + c_3 z) + d = 0

Parameters
[out]a1,a2,a3,b1,b2,b3,c1,c2,c3,dThe coefficients

◆ Radius()

AMCAX_API double AMCAX::Sphere::Radius ( ) const

Get the radius.

Returns
The radius

◆ Scale()

AMCAX_API Sphere & AMCAX::Sphere::Scale ( const Point3 point,
double  scale 
)

Scale the sphere by a point.

Parameters
pointThe scaling center point
scaleThe scale value
Returns
The reference to self

◆ SetRadius()

AMCAX_API void AMCAX::Sphere::SetRadius ( double  r)

Set the radius.

Parameters
rThe radius

◆ Transform()

AMCAX_API Sphere & AMCAX::Sphere::Transform ( const Transformation3 tr)

Transform the sphere.

Parameters
trThe transformation
Returns
The reference to self

◆ Volume()

AMCAX_API double AMCAX::Sphere::Volume ( ) const

Get the volume of the ball bounded by the sphere.

Returns
The volume of the ball

The documentation for this class was generated from the following file: