Main Page Class Hierarchy Compound List File List Compound Members File Members
MRModel Class Reference
#include <MRModel.h>
Collaboration diagram for MRModel:
List of all members.
Public Members |
| | | MRModel () |
| | | ~MRModel () |
| | Void | SimplestModel () |
| | | Set to the simplest model possible.
|
| | Void | MostComplexModel () |
| | | Set to the most complex model possible.
|
| | Void | AdaptFaces (Int targetFaces) |
| | | Adapt the model so it has 'targetFaces' faces.
|
| | Void | AdaptClusters (Int targetClusters) |
| | | Adapt the model so it has 'targetClusters' face clusters.
|
| | Void | AdaptComplexity (GCLReal complexity) |
| | | complexity is [0, 1]; adapts model to totalFaces * sqr(c). More...
|
| | Void | AdaptLength ( GCLReal threshold, const Transform &M, const Transform &P, Float timeLimit = vl_inf ) |
| | | Adapt so screen error is constant. More...
|
| | Bool | Parse (StrConst filename) |
| | Bool | ParseBinary () |
| | Bool | ParseText () |
| | Void | WriteBinary () |
| | Void | Draw (Renderer &r) |
| | Void | PrepareModel () |
| | Void | AdjustLeafFaces () |
| | Void | PrepareClusters () |
| | Void | PrepareVertices () |
| | Void | DrawClusterFaces (Int i, Renderer &r) |
| | Void | DrawClusters (Renderer &r) |
| | | draw representations of face clusters.
|
| | Void | DrawVertices (Renderer &r) |
| | | draw representations of simplification vertices.
|
| | Vector | FaceAreaNormal (Int faceIdx) |
| | Int | ReorderLeafClusters (Int ic, FaceIdxArray &newFaces) |
| | | Reorder cluster faces consecutively. More...
|
| | Void | CropClusters (Int numClusters) |
| | Void | CreateClusterColours () |
| | Void | DumpFCH (StrConst filename) |
| | | Dump the cluster hierarchy as a .hier file.
|
| | Void | UpdateBounds (Point &min, Point &max, const Transform &t) |
| | Void | AddContraction ( Int child0, Int child1, Int face1, Int face2, GCLReal error, const Point &p, Int delta ) |
| | | Add a vertex contraction to the model.
|
| | Void | AddCluster ( Int child0, Int child1, Point ¢re, VecTrans &axis, Vector &fitNormal, GCLReal d, Point &clusMin, Point &clusMax, Int clusID ) |
| | | Add a cluster to the model.
|
| | Bool | IsFace (Int i) |
| | | returns true if the ID belongs to a face.
|
| | FaceCluster& | Cluster (Int i) |
| | | returns a reference to the cluster with ID 'i'.
|
| | PointList* | points |
| | | vertex locations.
|
| | ColourList* | colours |
| | | per-vertex colours, if they exist.
|
| | Colour | colour |
| | | model colour.
|
| | FaceIdxArray | faces |
| | | list of face vertex indicies.
|
| | Int | currentFaces |
| | | number of faces in current model.
|
| | IndexList | rootVertices |
| | | root nodes of the vertex forest.
|
| | MRVertexes | vertices |
| | | all vertex nodes.
|
| | MRCodesList | vtxCodes |
| | | tree codes per face.
|
| | MRFlagsList | vtxFlags |
| | | active vertices/faces.
|
| | FaceIdxArray | vtxFaces |
| | | list of extra face info for MMF stuff.
|
| | Bool | verticesPrepped |
| | Int | currentClusters |
| | | number of clusters in current model.
|
| | Bool | clustersPrepped |
| | | clusters have been preprocessed.
|
| | IndexList | rootClusters |
| | | indices of root clusters.
|
| | FaceClusList | clusters |
| | | all the face clusters.
|
| | ActList | clustersActive |
| | | list of active clusters.
|
| | ColourList | clusterColours |
| | | colours to show varying clusters.
|
| | NormalList | faceNormals |
| | | area-weighted normals.
|
| | Int | firstClusterID |
| | | cluster ID of the first stored cluster.
|
| | Int | lastClusterID |
| | | cluster ID of the last stored cluster.
|
| | Bool | showMeta |
| | | show clusters/vertices.
|
| | Bool | showFaces |
| | | show underlying model.
|
| | Bool | colourFaces |
| | | colour faces according to face clusters.
|
| | FileName | modelFile |
| | | location of source file.
|
| | Flags32 | flags |
| | | model flags.
|
| | GCLReal | lastComplexity |
| | | complexity model was last adapted to.
|
Static Public Members |
| | Bool | sAvgClusColours = false |
| | | parent's colour is average of children's.
|
Detailed Description
Definition at line 27 of file MRModel.h.
Constructor & Destructor Documentation
Member Function Documentation
Void MRModel::AdaptClusters (Int targetClusters)
|
Adapt the model so it has 'targetClusters' face clusters.
Definition at line 371 of file MRModel.cc.
Void MRModel::AdaptComplexity (GCLReal complexity)
|
complexity is [0, 1]; adapts model to totalFaces * sqr(c).
We take # faces = complexity^2 * total faces.
The justification for this is that if we define complexity
as detail in a single dimension, for surfaces the number
of faces will go up as the square of the complexity.
Definition at line 443 of file MRModel.cc.
Void MRModel::AdaptFaces (Int targetFaces)
|
Adapt the model so it has 'targetFaces' faces.
Definition at line 319 of file MRModel.cc.
Adapt so screen error is constant.
Given model matrix M and projection matrix P, adapt so that
the error in screen space is below threshold.
-
Parameters:
-
threshold
|
screen-space error threshold |
M
|
model matrix |
P
|
projection matrix |
timeLimit
|
time limit in seconds. |
Definition at line 260 of file MRModel.cc.
Add a cluster to the model.
Definition at line 139 of file MRModel.cc.
Void MRModel::AddContraction (Int child0, Int child1, Int face0, Int face1, GCLReal error, const Point & p, Int delta)
|
Add a vertex contraction to the model.
Definition at line 82 of file MRModel.cc.
Void MRModel::AdjustLeafFaces ()
|
Adjusts the model's face indexes to match the current active
simplified vertices. We do this as a separate operation to
the vertex split/edge collapse operations to avoid having
to store adjacency information.
Definition at line 460 of file MRModel.cc.
returns a reference to the cluster with ID 'i'.
Definition at line 135 of file MRModel.h.
Void MRModel::CreateClusterColours ()
|
Void MRModel::CropClusters (Int numClusters)
|
Void MRModel::DrawClusterFaces (Int ic, Renderer & r)
|
Void MRModel::DrawClusters (Renderer & r)
|
draw representations of face clusters.
Definition at line 1464 of file MRModel.cc.
Void MRModel::DrawVertices (Renderer & r)
|
draw representations of simplification vertices.
Definition at line 1489 of file MRModel.cc.
Void MRModel::DumpFCH (StrConst filename)
|
Dump the cluster hierarchy as a .hier file.
Definition at line 484 of file MRModel.cc.
Vector MRModel::FaceAreaNormal (Int faceIdx)
|
Bool MRModel::IsFace (Int i) [inline]
|
returns true if the ID belongs to a face.
Definition at line 132 of file MRModel.h.
Void MRModel::MostComplexModel ()
|
Set to the most complex model possible.
Definition at line 1525 of file MRModel.cc.
Bool MRModel::Parse (StrConst filename)
|
Bool MRModel::ParseBinary ()
|
Bool MRModel::ParseText ()
|
Void MRModel::PrepareClusters ()
|
Void MRModel::PrepareModel ()
|
Void MRModel::PrepareVertices ()
|
Int MRModel::ReorderLeafClusters (Int ic, FaceIdxArray & newFaces)
|
Reorder cluster faces consecutively.
We reorder the faces so that the faces belonging to a particular
cluster come consecutively. This allows us to truncate the cluster
hierarchy;
It also provides for the possibility of placing start/end ID fields
in the cluster to avoid descending the tree to figure out the faces
belonging to a particular cluster.
Definition at line 582 of file MRModel.cc.
Void MRModel::SimplestModel ()
|
Set to the simplest model possible.
Definition at line 1507 of file MRModel.cc.
Void MRModel::WriteBinary ()
|
Member Data Documentation
colours to show varying clusters.
Definition at line 127 of file MRModel.h.
all the face clusters.
Definition at line 125 of file MRModel.h.
list of active clusters.
Definition at line 126 of file MRModel.h.
Bool MRModel::clustersPrepped
|
clusters have been preprocessed.
Definition at line 123 of file MRModel.h.
Bool MRModel::colourFaces
|
colour faces according to face clusters.
Definition at line 141 of file MRModel.h.
per-vertex colours, if they exist.
Definition at line 108 of file MRModel.h.
Int MRModel::currentClusters
|
number of clusters in current model.
Definition at line 122 of file MRModel.h.
Int MRModel::currentFaces
|
number of faces in current model.
Definition at line 113 of file MRModel.h.
area-weighted normals.
Definition at line 128 of file MRModel.h.
list of face vertex indicies.
Definition at line 110 of file MRModel.h.
Int MRModel::firstClusterID
|
cluster ID of the first stored cluster.
Definition at line 129 of file MRModel.h.
Int MRModel::lastClusterID
|
cluster ID of the last stored cluster.
Definition at line 130 of file MRModel.h.
complexity model was last adapted to.
Definition at line 146 of file MRModel.h.
FileName MRModel::modelFile
|
location of source file.
Definition at line 143 of file MRModel.h.
indices of root clusters.
Definition at line 124 of file MRModel.h.
root nodes of the vertex forest.
Definition at line 114 of file MRModel.h.
Bool MRModel::sAvgClusColours = false [static]
|
parent's colour is average of children's.
Definition at line 147 of file MRModel.h.
show underlying model.
Definition at line 140 of file MRModel.h.
show clusters/vertices.
Definition at line 139 of file MRModel.h.
Bool MRModel::verticesPrepped
|
tree codes per face.
Definition at line 116 of file MRModel.h.
list of extra face info for MMF stuff.
Definition at line 118 of file MRModel.h.
active vertices/faces.
Definition at line 117 of file MRModel.h.
The documentation for this class was generated from the following files:
Generated at Sat Aug 5 00:17:08 2000 for Graphics Class Library by
1.1.0 written by Dimitri van Heesch,
© 1997-2000