Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

DooSabin Class Reference

#include <DooSabin.h>

Inheritance diagram for DooSabin:

Inheritance graph
[legend]
Collaboration diagram for DooSabin:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implementation of Doo-Sabin subdivision.

Definition at line 10 of file DooSabin.h.

Public Member Functions

 DooSabin (Mesh *m)
 Constructor for a Doo-Sabin subdivision surface.

 ~DooSabin ()
 Destructor for a subdivision surface.

virtual void compute (int n)
 Compute a certain level of subdivision.

virtual int matrix (int *n, double *m)
 Compute the subdivision matrix.


Private Member Functions

void subdivide (int n)
 Subdivide the mesh to the nth level.


Private Attributes

Meshmm_mesh
 No use having a mesh member in Surface when mesh doesn't have a copy constructor.


Constructor & Destructor Documentation

DooSabin::DooSabin Mesh m  ) 
 

Constructor for a Doo-Sabin subdivision surface.

Parameters:
m The base mesh for the surface.

Definition at line 129 of file DooSabin.cpp.

DooSabin::~DooSabin  ) 
 

Destructor for a subdivision surface.

Frees all related memory. Any extracted meshes become invalid.

Definition at line 136 of file DooSabin.cpp.


Member Function Documentation

void DooSabin::compute int  n  )  [virtual]
 

Compute a certain level of subdivision.

Parameters:
n The level to which to compute.

Implements Subdivision.

Definition at line 141 of file DooSabin.cpp.

References Mesh::getMeshGroupCount(), mm_mesh, and subdivide().

virtual int DooSabin::matrix int *  n,
double *  m
[inline, virtual]
 

Compute the subdivision matrix.

Empty for now.

Parameters:
n The number of edges of the face on which to compute.
m On return, the matrix.
Returns:
The size of the matrix? who knows.. this is stupid.

Implements Subdivision.

Definition at line 45 of file DooSabin.h.

void DooSabin::subdivide int  n  )  [private]
 

Subdivide the mesh to the nth level.

Assumes the n-1'th subdivision has already occurred.

Parameters:
n The next level of subdivision to be done.

Definition at line 163 of file DooSabin.cpp.

References MeshGroup::addFace(), Mesh::addFace(), Mesh::addGroup(), Mesh::addNormal(), Mesh::addVertex(), create_boundary_vertices(), VertexData::face, MeshGroup::facePostIncrement(), find_edge_data(), find_vertex_index(), Mesh::getFace(), Mesh::getGroup(), Mesh::getIndexVertex(), Mesh::getVertexCount(), green(), VertexData::i, IndexEdge, IndexFace, IndexVertex, mm_mesh, EdgeData::new_v, VertexData::normal, red(), MeshGroup::rewindFaceList(), indexVertex::setArbitraryIndex(), and U32.

Referenced by compute().


Member Data Documentation

Mesh& DooSabin::mm_mesh [private]
 

No use having a mesh member in Surface when mesh doesn't have a copy constructor.

Definition at line 68 of file DooSabin.h.

Referenced by compute(), and subdivide().


The documentation for this class was generated from the following files:
Generated on Mon Jun 28 15:02:13 2004 for Advanced Surface Library by doxygen 1.3.4