Class Quadric

Class Documentation

class Quadric

This class stores a quadric as a symmetric 4x4 matrix.

Used by the error quadric mesh decimation algorithms.

Public Functions

inline Quadric(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j)

construct quadric from upper triangle of symmetrix 4x4 matrix

inline Quadric(double a = 0.0, double b = 0.0, double c = 0.0, double d = 0.0)

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

inline Quadric(const Normal &n, const Point &p)

construct from point and normal specifying a plane

inline void clear()

set all matrix entries to zero

inline Quadric &operator+=(const Quadric &q)

add given quadric to this quadric

inline Quadric &operator*=(double s)

multiply quadric by a scalar

inline double operator()(const Point &p) const

evaluate quadric Q at position p by computing (p^T * Q * p)