|
Ocean
|
This class implements a sphere quadric. More...
#include <Quadric.h>
Public Member Functions | |
| Sphere () | |
| Creates an invalid sphere. | |
| Sphere (const Scalar radius, const HomogenousMatrix4 &transformation) | |
| Creates a sphere by a given radius and a transformation. | |
Public Member Functions inherited from Ocean::Geometry::Quadric | |
| Quadric () | |
| Creates an invalid quadric. | |
| bool | isInside (const Vector3 &point) const |
| Returns whether a given point lies inside or on the surface of the cone. | |
| bool | isOnSurface (const Vector3 &point) const |
| Returns whether a given point lies on the surface of the cone. | |
| Scalar | value (const Vector3 &point) const |
| Returns the quadric value for a given point. | |
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. | |
Protected Attributes inherited from Ocean::Geometry::Quadric | |
| SquareMatrix4 | combinedQuadric |
| Holds the combined quadric and transformation matrix. | |
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
| Ocean::Geometry::Sphere::Sphere | ( | ) |
Creates an invalid sphere.
| Ocean::Geometry::Sphere::Sphere | ( | const Scalar | radius, |
| const HomogenousMatrix4 & | transformation | ||
| ) |
Creates a sphere by a given radius and a transformation.
| radius | Radius of the sphere |
| transformation | Transformation to transform the default sphere defined with midpoint at (0, 0, 0) |