Developer Documentation
OpenMesh::Geometry::QuadricT< Scalar > Class Template Reference

#include <OpenFlipper/libs_required/OpenMesh/src/OpenMesh/Core/Geometry/QuadricT.hh>

Public Types

typedef Scalar value_type
 
typedef QuadricT< Scalar > type
 
typedef QuadricT< Scalar > Self
 

Public Member Functions

 QuadricT (Scalar _a, Scalar _b, Scalar _c, Scalar _d, Scalar _e, Scalar _f, Scalar _g, Scalar _h, Scalar _i, Scalar _j)
 construct with upper triangle of symmetrix 4x4 matrix More...
 
 QuadricT (Scalar _a=0.0, Scalar _b=0.0, Scalar _c=0.0, Scalar _d=0.0)
 constructor from given plane equation: ax+by+cz+d_=0 More...
 
template<class _Point >
 QuadricT (const _Point &_pt)
 
template<class _Normal , class _Point >
 QuadricT (const _Normal &_n, const _Point &_p)
 
void set (Scalar _a, Scalar _b, Scalar _c, Scalar _d, Scalar _e, Scalar _f, Scalar _g, Scalar _h, Scalar _i, Scalar _j)
 
template<class _Point >
void set_distance_to_point (const _Point &_pt)
 
void set_distance_to_plane (Scalar _a, Scalar _b, Scalar _c, Scalar _d)
 
template<class _Normal , class _Point >
void set_distance_to_plane (const _Normal &_n, const _Point &_p)
 
void clear ()
 set all entries to zero More...
 
QuadricT< Scalar > & operator+= (const QuadricT< Scalar > &_q)
 add quadrics More...
 
QuadricT< Scalar > operator+ (const QuadricT< Scalar > &_other) const
 
QuadricT< Scalar > & operator*= (Scalar _s)
 multiply by scalar More...
 
QuadricT< Scalar > operator* (Scalar _s) const
 
template<class _Vec4 >
_Vec4 operator* (const _Vec4 &_v) const
 multiply 4D vector from right: Q*v More...
 
template<class _Vec >
Scalar operator() (const _Vec &_v) const
 evaluate quadric Q at (3D or 4D) vector v: v*Q*v More...
 
Scalar a () const
 
Scalar b () const
 
Scalar c () const
 
Scalar d () const
 
Scalar e () const
 
Scalar f () const
 
Scalar g () const
 
Scalar h () const
 
Scalar i () const
 
Scalar j () const
 
Scalar xx () const
 
Scalar xy () const
 
Scalar xz () const
 
Scalar xw () const
 
Scalar yy () const
 
Scalar yz () const
 
Scalar yw () const
 
Scalar zz () const
 
Scalar zw () const
 
Scalar ww () const
 

Protected Member Functions

template<class _Vec3 >
Scalar evaluate (const _Vec3 &_v, GenProg::Int2Type< 3 >) const
 evaluate quadric Q at 3D vector v: v*Q*v More...
 
template<class _Vec4 >
Scalar evaluate (const _Vec4 &_v, GenProg::Int2Type< 4 >) const
 evaluate quadric Q at 4D vector v: v*Q*v More...
 

Private Attributes

Scalar a_
 
Scalar b_
 
Scalar c_
 
Scalar d_
 
Scalar e_
 
Scalar f_
 
Scalar g_
 
Scalar h_
 
Scalar i_
 
Scalar j_
 

Detailed Description

template<class Scalar>
class OpenMesh::Geometry::QuadricT< Scalar >

/class QuadricT Geometry/QuadricT.hh

Stores a quadric as a 4x4 symmetrix matrix. Used by the error quadric based mesh decimation algorithms.

Definition at line 82 of file QuadricT.hh.

Member Typedef Documentation

◆ Self

template<class Scalar >
typedef QuadricT<Scalar> OpenMesh::Geometry::QuadricT< Scalar >::Self

Definition at line 87 of file QuadricT.hh.

◆ type

template<class Scalar >
typedef QuadricT<Scalar> OpenMesh::Geometry::QuadricT< Scalar >::type

Definition at line 86 of file QuadricT.hh.

◆ value_type

template<class Scalar >
typedef Scalar OpenMesh::Geometry::QuadricT< Scalar >::value_type

Definition at line 85 of file QuadricT.hh.

Constructor & Destructor Documentation

◆ QuadricT() [1/4]

template<class Scalar >
OpenMesh::Geometry::QuadricT< Scalar >::QuadricT ( Scalar  _a,
Scalar  _b,
Scalar  _c,
Scalar  _d,
Scalar  _e,
Scalar  _f,
Scalar  _g,
Scalar  _h,
Scalar  _i,
Scalar  _j 
)
inline

construct with upper triangle of symmetrix 4x4 matrix

Definition at line 94 of file QuadricT.hh.

◆ QuadricT() [2/4]

template<class Scalar >
OpenMesh::Geometry::QuadricT< Scalar >::QuadricT ( Scalar  _a = 0.0,
Scalar  _b = 0.0,
Scalar  _c = 0.0,
Scalar  _d = 0.0 
)
inline

constructor from given plane equation: ax+by+cz+d_=0

Definition at line 107 of file QuadricT.hh.

◆ QuadricT() [3/4]

template<class Scalar >
template<class _Point >
OpenMesh::Geometry::QuadricT< Scalar >::QuadricT ( const _Point &  _pt)
inlineexplicit

Definition at line 115 of file QuadricT.hh.

◆ QuadricT() [4/4]

template<class Scalar >
template<class _Normal , class _Point >
OpenMesh::Geometry::QuadricT< Scalar >::QuadricT ( const _Normal &  _n,
const _Point &  _p 
)
inline

Definition at line 121 of file QuadricT.hh.

Member Function Documentation

◆ a()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::a ( ) const
inline

Definition at line 219 of file QuadricT.hh.

◆ b()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::b ( ) const
inline

Definition at line 220 of file QuadricT.hh.

◆ c()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::c ( ) const
inline

Definition at line 221 of file QuadricT.hh.

◆ clear()

template<class Scalar >
void OpenMesh::Geometry::QuadricT< Scalar >::clear ( )
inline

set all entries to zero

Definition at line 166 of file QuadricT.hh.

◆ d()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::d ( ) const
inline

Definition at line 222 of file QuadricT.hh.

◆ e()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::e ( ) const
inline

Definition at line 223 of file QuadricT.hh.

◆ evaluate() [1/2]

template<class Scalar >
template<class _Vec3 >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::evaluate ( const _Vec3 &  _v,
GenProg::Int2Type< 3 >   
) const
inlineprotected

evaluate quadric Q at 3D vector v: v*Q*v

Definition at line 245 of file QuadricT.hh.

◆ evaluate() [2/2]

template<class Scalar >
template<class _Vec4 >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::evaluate ( const _Vec4 &  _v,
GenProg::Int2Type< 4 >   
) const
inlineprotected

evaluate quadric Q at 4D vector v: v*Q*v

Definition at line 256 of file QuadricT.hh.

◆ f()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::f ( ) const
inline

Definition at line 224 of file QuadricT.hh.

◆ g()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::g ( ) const
inline

Definition at line 225 of file QuadricT.hh.

◆ h()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::h ( ) const
inline

Definition at line 226 of file QuadricT.hh.

◆ i()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::i ( ) const
inline

Definition at line 227 of file QuadricT.hh.

◆ j()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::j ( ) const
inline

Definition at line 228 of file QuadricT.hh.

◆ operator()()

template<class Scalar >
template<class _Vec >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::operator() ( const _Vec &  _v) const
inline

evaluate quadric Q at (3D or 4D) vector v: v*Q*v

Definition at line 214 of file QuadricT.hh.

◆ operator*() [1/2]

template<class Scalar >
template<class _Vec4 >
_Vec4 OpenMesh::Geometry::QuadricT< Scalar >::operator* ( const _Vec4 &  _v) const
inline

multiply 4D vector from right: Q*v

Definition at line 203 of file QuadricT.hh.

◆ operator*() [2/2]

template<class Scalar >
QuadricT< Scalar > OpenMesh::Geometry::QuadricT< Scalar >::operator* ( Scalar  _s) const
inline

Definition at line 195 of file QuadricT.hh.

◆ operator*=()

template<class Scalar >
QuadricT< Scalar > & OpenMesh::Geometry::QuadricT< Scalar >::operator*= ( Scalar  _s)
inline

multiply by scalar

Definition at line 186 of file QuadricT.hh.

◆ operator+()

template<class Scalar >
QuadricT< Scalar > OpenMesh::Geometry::QuadricT< Scalar >::operator+ ( const QuadricT< Scalar > &  _other) const
inline

Definition at line 178 of file QuadricT.hh.

◆ operator+=()

template<class Scalar >
QuadricT< Scalar > & OpenMesh::Geometry::QuadricT< Scalar >::operator+= ( const QuadricT< Scalar > &  _q)
inline

add quadrics

Definition at line 169 of file QuadricT.hh.

◆ set()

template<class Scalar >
void OpenMesh::Geometry::QuadricT< Scalar >::set ( Scalar  _a,
Scalar  _b,
Scalar  _c,
Scalar  _d,
Scalar  _e,
Scalar  _f,
Scalar  _g,
Scalar  _h,
Scalar  _i,
Scalar  _j 
)
inline

Definition at line 127 of file QuadricT.hh.

◆ set_distance_to_plane() [1/2]

template<class Scalar >
template<class _Normal , class _Point >
void OpenMesh::Geometry::QuadricT< Scalar >::set_distance_to_plane ( const _Normal &  _n,
const _Point &  _p 
)
inline

Definition at line 160 of file QuadricT.hh.

◆ set_distance_to_plane() [2/2]

template<class Scalar >
void OpenMesh::Geometry::QuadricT< Scalar >::set_distance_to_plane ( Scalar  _a,
Scalar  _b,
Scalar  _c,
Scalar  _d 
)
inline

Definition at line 149 of file QuadricT.hh.

◆ set_distance_to_point()

template<class Scalar >
template<class _Point >
void OpenMesh::Geometry::QuadricT< Scalar >::set_distance_to_point ( const _Point &  _pt)
inline

Definition at line 140 of file QuadricT.hh.

◆ ww()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::ww ( ) const
inline

Definition at line 239 of file QuadricT.hh.

◆ xw()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::xw ( ) const
inline

Definition at line 233 of file QuadricT.hh.

◆ xx()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::xx ( ) const
inline

Definition at line 230 of file QuadricT.hh.

◆ xy()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::xy ( ) const
inline

Definition at line 231 of file QuadricT.hh.

◆ xz()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::xz ( ) const
inline

Definition at line 232 of file QuadricT.hh.

◆ yw()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::yw ( ) const
inline

Definition at line 236 of file QuadricT.hh.

◆ yy()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::yy ( ) const
inline

Definition at line 234 of file QuadricT.hh.

◆ yz()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::yz ( ) const
inline

Definition at line 235 of file QuadricT.hh.

◆ zw()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::zw ( ) const
inline

Definition at line 238 of file QuadricT.hh.

◆ zz()

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::zz ( ) const
inline

Definition at line 237 of file QuadricT.hh.

Member Data Documentation

◆ a_

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::a_
private

Definition at line 267 of file QuadricT.hh.

◆ b_

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::b_
private

Definition at line 267 of file QuadricT.hh.

◆ c_

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::c_
private

Definition at line 267 of file QuadricT.hh.

◆ d_

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::d_
private

Definition at line 267 of file QuadricT.hh.

◆ e_

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::e_
private

Definition at line 268 of file QuadricT.hh.

◆ f_

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::f_
private

Definition at line 268 of file QuadricT.hh.

◆ g_

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::g_
private

Definition at line 268 of file QuadricT.hh.

◆ h_

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::h_
private

Definition at line 269 of file QuadricT.hh.

◆ i_

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::i_
private

Definition at line 269 of file QuadricT.hh.

◆ j_

template<class Scalar >
Scalar OpenMesh::Geometry::QuadricT< Scalar >::j_
private

Definition at line 270 of file QuadricT.hh.


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