Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
vtkEdgeTable Class Reference
keep track of edges (edge is pair of integer id's).
More...
#include <vtkEdgeTable.h>
Inheritance diagram for vtkEdgeTable:
[legend]Collaboration diagram for vtkEdgeTable:
[legend]List of all members.
Public Methods |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | Initialize () |
int | InitEdgeInsertion (int numPoints, int storeAttributes=0) |
int | InsertEdge (int p1, int p2) |
void | InsertEdge (int p1, int p2, int attributeId) |
int | IsEdge (int p1, int p2) |
int | InitPointInsertion (vtkPoints *newPts, int estSize) |
int | InsertUniquePoint (int p1, int p2, float x[3], int &ptId) |
virtual int | GetNumberOfEdges () |
void | InitTraversal () |
int | GetNextEdge (int &p1, int &p2) |
void | Reset () |
Static Public Methods |
vtkEdgeTable * | New () |
int | IsTypeOf (const char *type) |
vtkEdgeTable * | SafeDownCast (vtkObject *o) |
Protected Methods |
| vtkEdgeTable () |
| ~vtkEdgeTable () |
| vtkEdgeTable (const vtkEdgeTable &) |
void | operator= (const vtkEdgeTable &) |
vtkIdList ** | Resize (int size) |
Protected Attributes |
vtkIdList ** | Table |
vtkIdList ** | Attributes |
int | StoreAttributes |
int | TableMaxId |
int | TableSize |
int | Position [2] |
int | Extend |
int | NumberOfEdges |
vtkPoints * | Points |
Detailed Description
keep track of edges (edge is pair of integer id's).
-
Date:
-
2000/12/10 20:08:09
-
Revision:
-
1.25
vtkEdgeTable is a general object for keeping track of lists of edges. An edge is defined by the pair of point id's (p1,p2). Methods are available to insert edges, check if edges exist, and traverse the list of edges. Also, it's possible to associate attribute information with each edge.
Definition at line 60 of file vtkEdgeTable.h.
Constructor & Destructor Documentation
vtkEdgeTable::vtkEdgeTable |
( |
|
) |
[protected] |
|
vtkEdgeTable::~vtkEdgeTable |
( |
|
) |
[protected] |
|
vtkEdgeTable::vtkEdgeTable |
( |
const vtkEdgeTable & |
|
) |
[inline, protected] |
|
Member Function Documentation
vtkEdgeTable* vtkEdgeTable::New |
( |
|
) |
[static] |
|
|
Instantiate object assuming that 1000 edges are to be inserted.
Reimplemented from vtkObject. |
virtual const char* vtkEdgeTable::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 vtkObject. |
int vtkEdgeTable::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 vtkObject. |
virtual int vtkEdgeTable::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 vtkObject. |
vtkEdgeTable* vtkEdgeTable::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 vtkObject. |
void vtkEdgeTable::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 vtkObject. |
void vtkEdgeTable::Initialize |
( |
|
) |
|
|
|
Free memory and return to instantiated state. |
int vtkEdgeTable::InitEdgeInsertion |
( |
int |
numPoints, |
|
|
int |
storeAttributes = 0 |
|
) |
|
|
|
Initialize the edge insertion process. Provide an estimate of the number of points in a dataset (the maximum range value of p1 or p2). The storeAttributes variable controls whether attributes are to be stored with the edge. If on, additional memory will be required by the data structure to store an integer id per each edge. This method is used in conjunction with one of the two InsertEdge() methods described below (don't mix the InsertEdge() methods). |
int vtkEdgeTable::InsertEdge |
( |
int |
p1, |
|
|
int |
p2 |
|
) |
|
|
|
Insert the edge (p1,p2) into the table. It is the user's responsibility to check if the edge has already been inserted (use IsEdge()). If the storeAttributes flag in InitEdgeInsertion() has been set, then the method returns a unique integer id (i.e., the edge id) that can be used to set and get edge attributes. Otherwise, the method will return 1. Do not mix this method with the InsertEdge() method that follows. |
void vtkEdgeTable::InsertEdge |
( |
int |
p1, |
|
|
int |
p2, |
|
|
int |
attributeId |
|
) |
|
|
|
Insert the edge (p1,p2) into the table with the attribute id specified (make sure the attributeId >= 0). Note that the attributeId is ignored if the storeAttributes variable was set to 0 in the InitEdgeInsertion() method. It is the user's responsibility to check if the edge has already been inserted (use IsEdge()). Do not mix this method with the previous InsertEdge() method. |
int vtkEdgeTable::IsEdge |
( |
int |
p1, |
|
|
int |
p2 |
|
) |
|
|
|
Return an integer id for the edge, or an attributeId of the edge (p1,p2) if the edge has been previously defined (it depends upon which version of InsertEdge() is being used); otherwise -1. The unique integer id can be used to set and retrieve attributes to the edge. |
int vtkEdgeTable::InitPointInsertion |
( |
vtkPoints * |
newPts, |
|
|
int |
estSize |
|
) |
|
|
|
Initialize the point insertion process. The newPts is an object representing point coordinates into which incremental insertion methods place their data. The points are associated with the edge. |
int vtkEdgeTable::InsertUniquePoint |
( |
int |
p1, |
|
|
int |
p2, |
|
|
float |
x[3], |
|
|
int & |
ptId |
|
) |
|
|
|
Insert a unique point on the specified edge. Invoke this method only after InitPointInsertion() has been called. Return 0 if point was already in the list, otherwise return 1. |
virtual int vtkEdgeTable::GetNumberOfEdges |
( |
|
) |
[virtual] |
|
|
Return the number of edges that have been inserted thus far. |
void vtkEdgeTable::InitTraversal |
( |
|
) |
|
|
|
Intialize traversal of edges in table. |
int vtkEdgeTable::GetNextEdge |
( |
int & |
p1, |
|
|
int & |
p2 |
|
) |
|
|
|
Traverse list of edges in table. Return the edge as (p1,p2), where p1 and p2 are point id's. Method return value is zero if list is exhausted; non-zero otherwise. The value of p1 is guaranteed to be <= p2. |
void vtkEdgeTable::Reset |
( |
|
) |
|
|
|
Reset the object and prepare for reinsertion of edges. Does not delete memory like the Initialize() method. |
void vtkEdgeTable::operator= |
( |
const vtkEdgeTable & |
|
) |
[inline, protected] |
|
vtkIdList** vtkEdgeTable::Resize |
( |
int |
size |
) |
[protected] |
|
Member Data Documentation
vtkIdList** vtkEdgeTable::Attributes [protected]
|
|
int vtkEdgeTable::StoreAttributes [protected]
|
|
int vtkEdgeTable::TableMaxId [protected]
|
|
int vtkEdgeTable::TableSize [protected]
|
|
int vtkEdgeTable::Position[2] [protected]
|
|
int vtkEdgeTable::Extend [protected]
|
|
int vtkEdgeTable::NumberOfEdges [protected]
|
|
The documentation for this class was generated from the following file:
Generated on Wed Nov 21 12:47:36 2001 for VTK by
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001