Radium Engine  1.5.0
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.

Constructor & Destructor Documentation

◆ Quadric()

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.

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.


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