lti::rayTraceEllipsoid< T > Class Template Reference
Ray tracing object for ellipsoids.
More...
#include <ltiDraw3D.h>
List of all members.
Public Member Functions |
| rayTraceEllipsoid (draw3D< T > &drawer) |
| rayTraceEllipsoid (draw3D< T > &drawer, const dpoint3D &theMean, const dmatrix &covar, const double &theMahDist=1) |
void | setEllipsoid (const dpoint3D &theMean, const dmatrix &covar, const double &theMahDist=1) |
virtual bool | rayTrace (const int x, const int y, double &z2, T &val) |
virtual bool | render () |
virtual const char * | getTypeName () const |
Protected Member Functions |
bool | intersectRayEllipsoid (const dpoint3D &ip, const dpoint3D &ray, const dpoint3D &mu, const matrix< double > &sigma, const double &mah, double &lambda, dpoint3D &sp) |
void | calcNormal (const dpoint3D &intersectionPoint, const dpoint3D &mu, const matrix< double > &sigma, dpoint3D &normal) const |
Protected Attributes |
dpoint3D | mean |
dmatrix | sigma |
dmatrix | invMat |
double | mahDist |
T | storedColor |
Detailed Description
template<class T>
class lti::rayTraceEllipsoid< T >
Ray tracing object for ellipsoids.
Constructor & Destructor Documentation
The constructor must receive the drawer object, where this object will be draw.
- Parameters:
-
| drawer | the drawer object where the ellipsoid will be drawn. |
| theMean | mean point of the ellipsoid |
| covar | covariance matrix used in the definition of the ellipsoid. This should be a 3x3 symmetric positive definite matrix. |
| theMahDist | mahalanobis distance using the given covariance matrix between the mean point and the surface of the ellipsoid. |
Member Function Documentation
compute the normal vector of an ellipsoid surface at a specific point
Given a point of the image plane in world coordinates and the direction of a ray passing through the focal point and the image point, compute the intersection of the ray and the ellipsoid formed using a constant mahalanobis distance from the mean value to the surface of the ellipsoid under consideration of the given covariance matrix.
- Parameters:
-
| ip | point of the image plane in world coordinates (see p2Dto3D()) |
| ray | point describing the direction of a ray passing through the image point and the focal point |
| mu | mean value of the ellipsoid |
| sigma | covariance matrix |
| mah | mahalanobis distance between the ellipsoid surface and the mean value mu |
| lambda | imgPnt + lambda*ray is the point on the ellipsoid surface to be considered |
| sp | point at the surface of the ellipsoid |
- Returns:
- true if point was found, or false if the image point does not belong to the ellipsoid
template<class T >
virtual bool lti::rayTraceEllipsoid< T >::rayTrace |
( |
const int |
x, |
|
|
const int |
y, |
|
|
double & |
z2, |
|
|
T & |
val | |
|
) |
| | [virtual] |
Compute the value of the pixel at x,y.
- Parameters:
-
| x | x coordinate in the image |
| y | y coordinate in the image |
| z2 | z coordinate of the surface point belonging to the given pixel (required for the z-buffering). |
| val | computed color (or gray) value for the given (x,y) pixel |
- Returns:
- true if the position corresponds to a pixel on the surface of the object.
Implements lti::rayTraceObject< T >.
set the parameters of the ellipsoid.
- Parameters:
-
| theMean | mean point of the ellipsoid |
| covar | covariance matrix used in the definition of the ellipsoid. This should be a 3x3 symmetric positive definite matrix. |
| theMahDist | mahalanobis distance using the given covariance matrix between the mean point and the surface of the ellipsoid. |
Member Data Documentation
mahalanobis distance of the ellipsoid surface to the mean point using the given covariance matrix
mean point of the ellipsoid
covariance matrix of the ellipsoid
current color of the ellipsoid
The documentation for this class was generated from the following file: