Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkQuadricDecimation Class Reference

`#include <vtkQuadricDecimation.h>`

Inheritance diagram for vtkQuadricDecimation:

[legend]
Collaboration diagram for vtkQuadricDecimation:

[legend]
List of all members.

## Detailed Description

reduce the number of triangles in a mesh

Date:
  2002/11/03 22:51:55

Revision:
  1.15

vtkQuadricDecimation is a filter to reduce the number of triangles in a triangle mesh, forming a good approximation to the original geometry. The input to vtkQuadricDecimation is a vtkPolyData object, and only triangles are treated. If you desire to decimate polygonal meshes, first triangulate the polygons with vtkTriangleFilter object.

The quadric error metric used is the one outlined in Hughues Hoppe's Vis '99 paper, "New Quadric Metric for Simplifying Meshes with Appearance Attributes."

Created by:
  - Henderson, Amy

CVS contributions (if > 5%):
  - Henderson, Amy (79%)
  - Law, Charles (9%)

CVS logs (CVSweb):
  - .`h` (`/Graphics/vtkQuadricDecimation.h)`
  - .`cxx` (`/Graphics/vtkQuadricDecimation.cxx)`

Tests:
  vtkQuadricDecimation (Tests)

Definition at line 57 of file vtkQuadricDecimation.h.

## Public Types
typedef vtkPolyDataToPolyDataFilter | Superclass
## Public Methods
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
vtkPolyData * | GetTestOutput ()
virtual void | SetMaximumCost (float)
virtual float | GetMaximumCost ()
virtual void | SetMaximumCollapsedEdges (int)
virtual int | GetMaximumCollapsedEdges ()
## Static Public Methods
int | IsTypeOf (const char *type)
vtkQuadricDecimation * | SafeDownCast (vtkObject *o)
vtkQuadricDecimation * | New ()
## Protected Methods
| vtkQuadricDecimation ()
| ~vtkQuadricDecimation ()
void | Execute ()
void | ComputeQuadric (vtkIdType pointId)
void | AddQuadric (vtkIdType oldPtId, vtkIdType newPtId)
float | ComputeCost (vtkIdType edgeId, float x[3], vtkPointData *pd)
void | FindAffectedEdges (vtkIdType p1Id, vtkIdType p2Id, vtkIdList *edges)
vtkIdType | GetEdgeCellId (vtkIdType p1Id, vtkIdType p2Id)
void | GetAttributeComponents ()
## Protected Attributes
float | MaximumCost
int | MaximumCollapsedEdges
int | NumberOfCollapsedEdges
vtkEdgeTable * | Edges
vtkIdList * | EndPoint1List
vtkIdList * | EndPoint2List
vtkPriorityQueue * | EdgeCosts
ErrorQuadric * | ErrorQuadrics
int | AttributeComponents [6]
int | NumberOfComponents
vtkPolyData * | Mesh

## Member Typedef Documentation

typedef vtkPolyDataToPolyDataFilter vtkQuadricDecimation::Superclass

| Reimplemented from vtkPolyDataToPolyDataFilter. Definition at line 60 of file vtkQuadricDecimation.h.

## Constructor & Destructor Documentation

vtkQuadricDecimation::vtkQuadricDecimation | ( |  | ) | `[protected]`

vtkQuadricDecimation::~vtkQuadricDecimation | ( |  | ) | `[protected]`

## Member Function Documentation

virtual const char* vtkQuadricDecimation::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkPolyDataToPolyDataFilter.

int vtkQuadricDecimation::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkPolyDataToPolyDataFilter.

virtual int vtkQuadricDecimation::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkPolyDataToPolyDataFilter.

vtkQuadricDecimation* vtkQuadricDecimation::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkPolyDataToPolyDataFilter.

void vtkQuadricDecimation::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkPolyDataToPolyDataFilter.

vtkQuadricDecimation* vtkQuadricDecimation::New | ( |  | ) | `[static]`

| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject.

virtual void vtkQuadricDecimation::SetMaximumCost | ( | float |  | ) | `[virtual]`

| Set/Get the maximum allowable cost of collapsing an edge.

virtual float vtkQuadricDecimation::GetMaximumCost | ( |  | ) | `[virtual]`

| Set/Get the maximum allowable cost of collapsing an edge.

virtual void vtkQuadricDecimation::SetMaximumCollapsedEdges | ( | int |  | ) | `[virtual]`

| Set/Get the maximum number of edges to collapse.

virtual int vtkQuadricDecimation::GetMaximumCollapsedEdges | ( |  | ) | `[virtual]`

| Set/Get the maximum number of edges to collapse.

vtkPolyData* vtkQuadricDecimation::GetTestOutput | ( |  | ) | `[inline]`

| For debugging: the last edge / triangles that were collapsed. Definition at line 78 of file vtkQuadricDecimation.h. References vtkPolyDataSource::GetOutput().

void vtkQuadricDecimation::Execute | ( |  | ) | `[protected, virtual]`

| This method is the old style execute method Reimplemented from vtkSource.

void vtkQuadricDecimation::ComputeQuadric | ( | vtkIdType | pointId | ) | `[protected]`

| Compute quadric for this vertex.

void vtkQuadricDecimation::AddQuadric | ( | vtkIdType | oldPtId,
|  | vtkIdType | newPtId
| ) | `[protected]`

| Add the quadrics for these 2 points since the edge between them has been collapsed.

float vtkQuadricDecimation::ComputeCost | ( | vtkIdType | edgeId,
|  | float | x[3],
|  | vtkPointData * | pd
| ) | `[protected]`

| Compute cost for contracting this edge and the point that gives us this cost.

void vtkQuadricDecimation::FindAffectedEdges | ( | vtkIdType | p1Id,
|  | vtkIdType | p2Id,
|  | vtkIdList * | edges
| ) | `[protected]`

| Find all edges that will have an endpoint change ids because of an edge collapse. p1Id and p2Id are the endpoints of the edge. p2Id is the pointId being removed.

vtkIdType vtkQuadricDecimation::GetEdgeCellId | ( | vtkIdType | p1Id,
|  | vtkIdType | p2Id
| ) | `[protected]`

| Find a cell that uses this edge.

void vtkQuadricDecimation::GetAttributeComponents | ( |  | ) | `[protected]`

| Find out how many components there are for each attribute for this poly data.

## Member Data Documentation

float vtkQuadricDecimation::MaximumCost`[protected]`

| Definition at line 109 of file vtkQuadricDecimation.h.

int vtkQuadricDecimation::MaximumCollapsedEdges`[protected]`

| Definition at line 110 of file vtkQuadricDecimation.h.

int vtkQuadricDecimation::NumberOfCollapsedEdges`[protected]`

| Definition at line 111 of file vtkQuadricDecimation.h.

vtkEdgeTable* vtkQuadricDecimation::Edges`[protected]`

| Definition at line 112 of file vtkQuadricDecimation.h.

vtkIdList* vtkQuadricDecimation::EndPoint1List`[protected]`

| Definition at line 113 of file vtkQuadricDecimation.h.

vtkIdList* vtkQuadricDecimation::EndPoint2List`[protected]`

| Definition at line 114 of file vtkQuadricDecimation.h.

vtkPriorityQueue* vtkQuadricDecimation::EdgeCosts`[protected]`

| Definition at line 115 of file vtkQuadricDecimation.h.

ErrorQuadric* vtkQuadricDecimation::ErrorQuadrics`[protected]`

| Definition at line 124 of file vtkQuadricDecimation.h.

int vtkQuadricDecimation::AttributeComponents[6]`[protected]`

| Definition at line 126 of file vtkQuadricDecimation.h.

int vtkQuadricDecimation::NumberOfComponents`[protected]`

| Definition at line 127 of file vtkQuadricDecimation.h.

vtkPolyData* vtkQuadricDecimation::Mesh`[protected]`

| Definition at line 128 of file vtkQuadricDecimation.h.

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

- Graphics/vtkQuadricDecimation.h