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

vtkQuadricDecimation Class Reference

reduce the number of triangles in a mesh. More...

#include <vtkQuadricDecimation.h>

Inheritance diagram for vtkQuadricDecimation:

Inheritance graph
[legend]
Collaboration diagram for vtkQuadricDecimation:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
vtkPolyDataGetTestOutput ()
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
vtkEdgeTableEdges
vtkIdListEndPoint1List
vtkIdListEndPoint2List
vtkPriorityQueueEdgeCosts
VTK_ERROR_QUADRICErrorQuadrics
int AttributeComponents [6]
int NumberOfComponents
vtkPolyDataMesh

Detailed Description

reduce the number of triangles in a mesh.

Date:
2001/10/11 13:37:13
Revision:
1.8

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."

Tests:
vtkQuadricDecimation (Tests)

Definition at line 72 of file vtkQuadricDecimation.h.


Constructor & Destructor Documentation

vtkQuadricDecimation::vtkQuadricDecimation   [protected]
 

vtkQuadricDecimation::~vtkQuadricDecimation   [protected]
 


Member Function Documentation

virtual const char* vtkQuadricDecimation::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

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 vtkTypeMacro 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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataToPolyDataFilter.

vtkQuadricDecimation* vtkQuadricDecimation::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

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 vtkSource.

vtkQuadricDecimation* vtkQuadricDecimation::New   [static]
 

Instantiate object with no start, end, or progress methods.

Reimplemented from vtkPolyDataSource.

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 93 of file vtkQuadricDecimation.h.

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 124 of file vtkQuadricDecimation.h.

int vtkQuadricDecimation::MaximumCollapsedEdges [protected]
 

Definition at line 125 of file vtkQuadricDecimation.h.

int vtkQuadricDecimation::NumberOfCollapsedEdges [protected]
 

Definition at line 126 of file vtkQuadricDecimation.h.

vtkEdgeTable* vtkQuadricDecimation::Edges [protected]
 

Definition at line 127 of file vtkQuadricDecimation.h.

vtkIdList* vtkQuadricDecimation::EndPoint1List [protected]
 

Definition at line 128 of file vtkQuadricDecimation.h.

vtkIdList* vtkQuadricDecimation::EndPoint2List [protected]
 

Definition at line 129 of file vtkQuadricDecimation.h.

vtkPriorityQueue* vtkQuadricDecimation::EdgeCosts [protected]
 

Definition at line 130 of file vtkQuadricDecimation.h.

VTK_ERROR_QUADRIC* vtkQuadricDecimation::ErrorQuadrics [protected]
 

Definition at line 131 of file vtkQuadricDecimation.h.

int vtkQuadricDecimation::AttributeComponents[6] [protected]
 

Definition at line 132 of file vtkQuadricDecimation.h.

int vtkQuadricDecimation::NumberOfComponents [protected]
 

Definition at line 133 of file vtkQuadricDecimation.h.

vtkPolyData* vtkQuadricDecimation::Mesh [protected]
 

Definition at line 134 of file vtkQuadricDecimation.h.


The documentation for this class was generated from the following file:
Generated on Thu Mar 28 14:40:32 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001