Assignments Assignments

Public Member Functions | Private Attributes | List of all members
Util::Quadric< Dim > Class Template Reference

`#include <geometry.h>`

## 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

## Detailed Description

template<unsigned int Dim>
class Util::Quadric< Dim >

This templated class represents a quadric surface.

## Constructor & Destructor Documentation

## ◆ Quadric() [1/3]

template<unsigned int Dim>

Util::Quadric< Dim >::Quadric | ( | void |  | ) |

The default constructor sets the quadric to the zero function.

## ◆ Quadric() [2/3]

template<unsigned int Dim>

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.)

## ◆ Quadric() [3/3]

template<unsigned int Dim>

Util::Quadric< Dim >::Quadric | ( | const Matrix< Dim+1, Dim+1 > & | Q | ) |

Constructs a quadric with the prescribed matrix.

## Member Function Documentation

## ◆ getConstant()

template<unsigned int Dim>

double Util::Quadric< Dim >::getConstant | ( | void |  | ) | const

This method returnsthe quadric's constant term.

## ◆ getLinear()

template<unsigned int Dim>

Point< Dim > Util::Quadric< Dim >::getLinear | ( | void |  | ) | const

This method returns (half) the quadric's linear term.

## ◆ getQuadratic()

template<unsigned int Dim>

Matrix< Dim, Dim > Util::Quadric< Dim >::getQuadratic | ( | void |  | ) | const

This method returns the quadric's quadratic term.

## ◆ intersect()

template<unsigned int Dim>

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.

## ◆ operator()() [1/2]

template<unsigned int Dim>

double Util::Quadric< Dim >::operator() | ( | const Point< Dim > & | p | ) | const

This method returns the evaluation of the quadric at a prescribed point.

## ◆ operator()() [2/2]

template<unsigned int Dim>

SquareMatrix< Dim+1 > Util::Quadric< Dim >::operator() | ( | void |  | ) | const

This method returns the quadric as a homogenous matrix.

## ◆ operator*()

template<unsigned int Dim>
template<unsigned int _Dim>

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.

## ◆ operator+()

template<unsigned int Dim>

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

## ◆ setConstant()

template<unsigned int Dim>

void Util::Quadric< Dim >::setConstant | ( | double | C | ) |

This method sets the linear term

## ◆ setExtremum()

template<unsigned int Dim>

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.

## ◆ setLinear()

template<unsigned int Dim>

void Util::Quadric< Dim >::setLinear | ( | Point< Dim > | L | ) |

This method sets the (half) linear term

## ◆ setQuadratic()

template<unsigned int Dim>

void Util::Quadric< Dim >::setQuadratic | ( | Matrix< Dim, Dim > | Q | ) |

This method sets the quadratic term

## Member Data Documentation

## ◆ _C

template<unsigned int Dim>

double Util::Quadric< Dim >::_C
| private

## ◆ _L

template<unsigned int Dim>

Point< Dim > Util::Quadric< Dim >::_L
| private

## ◆ _Q

template<unsigned int Dim>

Matrix< Dim , Dim > Util::Quadric< Dim >::_Q
| private

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

- Assignments/Util/geometry.h
- Assignments/Util/geometry.inl
- Assignments/Util/geometry.todo.inl