Assignments
Assignments
|
#include <geometry.h>
Classes | |
struct | BoundingBoxOverlap |
Public Member Functions | |
Quadric (void) | |
Quadric (const Matrix< Dim, Dim > &Q, const Point< Dim > &L, const double &C) | |
Quadric (const Matrix< Dim+1, Dim+1 > &Q) | |
Matrix< Dim+1, Dim+1 > | operator() (void) const |
Matrix< Dim, Dim > | getQuadratic (void) const |
Point< Dim > | getLinear (void) const |
double | getConstant (void) const |
void | setQuadratic (Matrix< Dim, Dim > Q) |
void | setLinear (Point< Dim > L) |
void | setConstant (double C) |
double | operator() (const Point< Dim > &p) const |
Quadric< 1 > | intersect (const Ray< Dim > &ray) const |
bool | setExtremum (Point< Dim > &extremum) const |
template<unsigned int _Dim> | |
Quadric< _Dim > | operator* (const Matrix< Dim, _Dim > &T) const |
Quadric< Dim > | operator+ (const Point< Dim > &t) const |
Private Attributes | |
Matrix< Dim, Dim > | _Q |
Point< Dim > | _L |
double | _C |
This templated class represents a quadric surface.
Util::Quadric< Dim >::Quadric | ( | void | ) |
The default constructor sets the quadric to the zero function.
Util::Quadric< Dim >::Quadric | ( | const Matrix< Dim, Dim > & | Q, |
const Point< Dim > & | L, | ||
const double & | C | ||
) |
Constructs a quadric with the prescribed quadratic, linear, and constant terms. (The quadric's matrix is set to the average of Q and its transpose.)
Util::Quadric< Dim >::Quadric | ( | const Matrix< Dim+1, Dim+1 > & | Q | ) |
Constructs a quadric with the prescribed matrix.
double Util::Quadric< Dim >::getConstant | ( | void | ) | const |
This method returnsthe quadric's constant term.
Point< Dim > Util::Quadric< Dim >::getLinear | ( | void | ) | const |
This method returns (half) the quadric's linear term.
Matrix< Dim, Dim > Util::Quadric< Dim >::getQuadratic | ( | void | ) | const |
This method returns the quadric's quadratic term.
Quadric< 1 > Util::Quadric< Dim >::intersect | ( | const Ray< Dim > & | ray | ) | const |
This method returns the one-dimensional quadric obtained by restricting the Dim-dimensional quadratic to the ray.
double Util::Quadric< Dim >::operator() | ( | const Point< Dim > & | p | ) | const |
This method returns the evaluation of the quadric at a prescribed point.
SquareMatrix< Dim+1 > Util::Quadric< Dim >::operator() | ( | void | ) | const |
This method returns the quadric as a homogenous matrix.
Quadric< _Dim > Util::Quadric< Dim >::operator* | ( | const Matrix< Dim, _Dim > & | T | ) | const |
This method returns the quadric in _Dim dimensions obtained by transforming this quadric. The evaluation of the new quadric at the point p is the value of the original quadric at the point T*p.
Quadric< Dim > Util::Quadric< Dim >::operator+ | ( | const Point< Dim > & | t | ) | const |
This method returns the translated quadric. The evaluation of the translated quadric at the point p is the value of the original quadric at the point p+t
void Util::Quadric< Dim >::setConstant | ( | double | C | ) |
This method sets the linear term
bool Util::Quadric< Dim >::setExtremum | ( | Point< Dim > & | extremum | ) | const |
This method sets the extremum of the quadric. As it is possible for the extremum not to be unique (e.g. for a cylinder), this method will return a boolean value indicating if the setting of the extremum was successfull.
void Util::Quadric< Dim >::setLinear | ( | Point< Dim > | L | ) |
This method sets the (half) linear term
void Util::Quadric< Dim >::setQuadratic | ( | Matrix< Dim, Dim > | Q | ) |
This method sets the quadratic term
|
private |
|
private |
|
private |