Ocean
Ocean::Geometry::Sphere Class Reference

This class implements a sphere quadric. More...

Inheritance diagram for Ocean::Geometry::Sphere:

Public Member Functions

 Sphere ()
 Creates an invalid sphere. More...
 
 Sphere (const Scalar radius, const HomogenousMatrix4 &transformation)
 Creates a sphere by a given radius and a transformation. More...
 
- Public Member Functions inherited from Ocean::Geometry::Quadric
 Quadric ()
 Creates an invalid quadric. More...
 
bool isInside (const Vector3 &point) const
 Returns whether a given point lies inside or on the surface of the cone. More...
 
bool isOnSurface (const Vector3 &point) const
 Returns whether a given point lies on the surface of the cone. More...
 
Scalar value (const Vector3 &point) const
 Returns the quadric value for a given point. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Ocean::Geometry::Quadric
void createCombinedQuadric (const SquareMatrix4 &quadric, const HomogenousMatrix4 &transformation)
 Creates the combination of quadric and transformation matrix. More...
 
- Protected Attributes inherited from Ocean::Geometry::Quadric
SquareMatrix4 combinedQuadric
 Holds the combined quadric and transformation matrix. More...
 

Detailed Description

This class implements a sphere quadric.

Quadric for sphere Q: Sphere midpoint at: (m_x, m_y, m_z) Sphere radius: r

[ 1 0 0 -m_x ]
[ 0 1 0 -m_y ]
[ 0 0 1 -m_z ]
[ -m_x -m_y -m_z (m_x^2 + m_y^2 - m_z^2 - r^2) ]

Inside test: p^T * Q * p <= 0.0

Constructor & Destructor Documentation

◆ Sphere() [1/2]

Ocean::Geometry::Sphere::Sphere ( )

Creates an invalid sphere.

◆ Sphere() [2/2]

Ocean::Geometry::Sphere::Sphere ( const Scalar  radius,
const HomogenousMatrix4 transformation 
)

Creates a sphere by a given radius and a transformation.

Parameters
radiusRadius of the sphere
transformationTransformation to transform the default sphere defined with midpoint at (0, 0, 0)

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