Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Core::Quadric< _DIM > Class Template Reference

#include <Core/Math/Quadric.hpp>

+ Collaboration diagram for Ra::Core::Quadric< _DIM >:

Public Types

using Matrix = Eigen::Matrix<Scalar, DIM, DIM>
 
using Vector = Eigen::Matrix<Scalar, DIM, 1>
 

Public Member Functions

 Quadric ()
 Construct an initialized quadric.
 
 Quadric (const Matrix &a, const Vector &b, double c)
 Construct and initialize a quadric.
 
 Quadric (const Quadric< DIM > &q)
 Construct a quadric from an other.
 
 Quadric (const Vector &n, Scalar ndotp)
 
const Matrix & getA () const
 Getters and setters.
 
void setA (const Matrix &a)
 
const Vector & getB () const
 
void setB (const Vector &b)
 
const double & getC () const
 
void setC (const double &c)
 
void compute (const Vector &n, double ndotp)
 
Eigen::EigenSolver< Matrix3 >::EigenvalueType computeEigenValuesA ()
 Computes eigen values and vectors of matrix A.
 
Eigen::EigenSolver< Matrix3 >::EigenvectorsType computeEigenVectorsA ()
 
Quadric operator+ (const Quadric &q) const
 Operators.
 
Quadric operator* (const Scalar scal)
 
Quadricoperator+= (const Quadric &q)
 
Quadricoperator*= (Scalar scal)
 

Static Public Attributes

static constexpr int DIM = _DIM
 

Detailed Description

template<int _DIM>
class Ra::Core::Quadric< _DIM >

A representation for quadratic equation as v^T A v + 2 b^T v + c

Reminder on ProgressiveMesh

Calculate the Quadric of the edge Qe = sum(Qf) with f all the faces adjacent
to e

Calculate vmin = Ae^(-1) be                with Qe = (Ae, be, ce)

Calculate the error on the edge
    error = vmin^T Ae vmin + 2 be^T vmin + ce       with Qe = (Ae, be, ce) 

Definition at line 27 of file Quadric.hpp.

Member Typedef Documentation

◆ Matrix

template<int _DIM>
using Ra::Core::Quadric< _DIM >::Matrix = Eigen::Matrix<Scalar, DIM, DIM>

Definition at line 31 of file Quadric.hpp.

◆ Vector

template<int _DIM>
using Ra::Core::Quadric< _DIM >::Vector = Eigen::Matrix<Scalar, DIM, 1>

Definition at line 32 of file Quadric.hpp.

Constructor & Destructor Documentation

◆ Quadric() [1/4]

template<int DIM>
Ra::Core::Quadric< DIM >::Quadric ( )
inline

Construct an initialized quadric.

Definition at line 85 of file Quadric.hpp.

◆ Quadric() [2/4]

template<int _DIM>
Ra::Core::Quadric< _DIM >::Quadric ( const Matrix & a,
const Vector & b,
double c )
inline

Construct and initialize a quadric.

Definition at line 38 of file Quadric.hpp.

◆ Quadric() [3/4]

template<int DIM>
Ra::Core::Quadric< DIM >::Quadric ( const Quadric< DIM > & q)
inline

Construct a quadric from an other.

Definition at line 88 of file Quadric.hpp.

◆ Quadric() [4/4]

template<int DIM>
Ra::Core::Quadric< DIM >::Quadric ( const Vector & n,
Scalar ndotp )
inline

Create a quadric from a normal vector n and the scalar which represent the distance from the plane of normal n to the origin

See also
compute

Definition at line 91 of file Quadric.hpp.

◆ ~Quadric()

template<int DIM>
Ra::Core::Quadric< DIM >::~Quadric ( )
inline

Definition at line 95 of file Quadric.hpp.

Member Function Documentation

◆ compute()

template<int DIM>
void Ra::Core::Quadric< DIM >::compute ( const Vector & n,
double ndotp )
inline

Create a quadric from a normal vector n and the scalar which represent the distance from the plane of normal n to the origin

Deprecated
Use constructor instead

Definition at line 98 of file Quadric.hpp.

◆ computeEigenValuesA()

template<int DIM>
Eigen::EigenSolver< Matrix3 >::EigenvalueType Ra::Core::Quadric< DIM >::computeEigenValuesA ( )
inline

Computes eigen values and vectors of matrix A.

Definition at line 135 of file Quadric.hpp.

◆ computeEigenVectorsA()

template<int DIM>
Eigen::EigenSolver< Matrix3 >::EigenvectorsType Ra::Core::Quadric< DIM >::computeEigenVectorsA ( )
inline

Definition at line 141 of file Quadric.hpp.

◆ getA()

template<int DIM>
const Quadric< DIM >::Matrix & Ra::Core::Quadric< DIM >::getA ( ) const
inline

Getters and setters.

Definition at line 105 of file Quadric.hpp.

◆ getB()

template<int DIM>
const Quadric< DIM >::Vector & Ra::Core::Quadric< DIM >::getB ( ) const
inline

Definition at line 115 of file Quadric.hpp.

◆ getC()

template<int DIM>
const double & Ra::Core::Quadric< DIM >::getC ( ) const
inline

Definition at line 125 of file Quadric.hpp.

◆ operator*()

template<int DIM>
Quadric< DIM > Ra::Core::Quadric< DIM >::operator* ( const Scalar scal)
inline

Definition at line 152 of file Quadric.hpp.

◆ operator*=()

template<int DIM>
Quadric< DIM > & Ra::Core::Quadric< DIM >::operator*= ( Scalar scal)
inline

Definition at line 165 of file Quadric.hpp.

◆ operator+()

template<int DIM>
Quadric< DIM > Ra::Core::Quadric< DIM >::operator+ ( const Quadric< _DIM > & q) const
inline

Operators.

Definition at line 147 of file Quadric.hpp.

+ Here is the call graph for this function:

◆ operator+=()

template<int DIM>
Quadric< DIM > & Ra::Core::Quadric< DIM >::operator+= ( const Quadric< _DIM > & q)
inline

Definition at line 157 of file Quadric.hpp.

◆ setA()

template<int DIM>
void Ra::Core::Quadric< DIM >::setA ( const Matrix & a)
inline

Definition at line 110 of file Quadric.hpp.

◆ setB()

template<int DIM>
void Ra::Core::Quadric< DIM >::setB ( const Vector & b)
inline

Definition at line 120 of file Quadric.hpp.

◆ setC()

template<int DIM>
void Ra::Core::Quadric< DIM >::setC ( const double & c)
inline

Definition at line 130 of file Quadric.hpp.

Member Data Documentation

◆ DIM

template<int _DIM>
int Ra::Core::Quadric< _DIM >::DIM = _DIM
staticconstexpr

Definition at line 30 of file Quadric.hpp.


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