ml::WEMPatch Class Reference

Base class for triangle and quad patches. More...

#include <WEMPatch.h>

Inheritance diagram for ml::WEMPatch:

ml::WEMPolygonPatch ml::WEMQuadPatch ml::WEMTrianglePatch

List of all members.

Public Member Functions

 WEMPatch (unsigned int bs=8192)
 Standard constructor.
 WEMPatch (WEM *wem, unsigned int bs=8192)
 Constructor which takes a pointer to the WEM this WEM is in.
 WEMPatch (const WEMPatch &wemPatch)
 Copy constructor.
virtual ~WEMPatch ()
 Standard destructor.
void dispose ()
 Dispose of internal data structures.
void addPatch (WEMPatch *wemPatch)
 Add given patch.
unsigned int getBlocksize () const
 Get block size for WEM.
virtual PatchTypes getPatchType () const =0
 Get mesh type.
virtual unsigned int getNumFaces () const
 Returns the number of faces in the WEM.
unsigned int getNumNodes () const
 Returns the number of nodes in the WEM.
WEMIndexVector< WEMNode > * getNodes ()
 Get pointer to nodes.
const WEMIndexVector< WEMNode > * getNodes () const
 Get pointer to nodes.
WEMNodegetNodeAt (unsigned int index)
 Get node at given index.
const WEMNodegetNodeAt (unsigned int index) const
 Get node at given index.
WEMNodeaddNode ()
 Instantiates a new WEMNode and adds it to the internal nodes vector.
void delNode (WEMNode *node)
 Deletes a node and erases it from the internal nodes vector.
void addNodeValues (WEMNode *target, WEMNode *source, double modifier)
 Add node values from node source to given target node.
void averageNodeValues (WEMNode *target, WEMNode *source1, WEMNode *source2)
 Average given source node values and store values in given target node.
void extendNodeValueLists (unsigned int number, double value)
 Extend all node value lists with given value.
unsigned int getNumEdges () const
 Returns the number of edges in the WEM.
WEMIndexVector< WEMEdge > * getEdges ()
 Get pointer to edges.
const WEMIndexVector< WEMEdge > * getEdges () const
 Get pointer to edges.
WEMEdgegetEdgeAt (unsigned int index)
 Get edge at given index.
const WEMEdgegetEdgeAt (unsigned int index) const
 Get edge at given index.
WEMEdgeaddEdge ()
 Instantiates a new WEMEdge and adds it to the internal edges vector.
void delEdge (WEMEdge *edge)
 Deletes an edge and erases it from the internal edges vector.
bool hasEdges () const
 Has this WEM edges?
void addEdgeValues (WEMEdge *target, WEMEdge *source, double modifier)
 Add edge values from edge source to given target edge.
void extendEdgeValueLists (unsigned int number, double value)
 Extend all edge value lists with given value.
virtual WEMFacegetFaceAt (unsigned int index)=0
 Get face at given index.
virtual const WEMFacegetFaceAt (unsigned int index) const =0
 Get face at given index.
virtual WEMFaceaddFace ()=0
 Instantiates a new face and adds it to the internal faces vector. Returns a pointer to this newly added face.
void addFaceValues (WEMFace *target, WEMFace *source, double modifier)
 Add face values from face source to given target face.
void extendFaceValueLists (unsigned int number, double value)
 Extend all face value lists with given value.
void setNodeTraversalState (bool state)
 Sets the specified traversal state to all nodes.
void setEdgeTraversalState (bool state)
 Sets the specified traversal state to all edges.
void setFaceTraversalState (bool state)
 Sets the specified traversal state to all faces.
void computeNormals ()
 Compute normals.
double getArea () const
 Returns the area of this patch in square mm.
double getVolume () const
 Returns the volume of this patch in cubic mm.
bool pointsOutwards () const
 Checks whether this patch has most normals pointing outwards.
WEMBoundingBoxgetBoundingBox ()
 Get the bounding box.
const WEMBoundingBoxgetBoundingBox () const
 Get the bounding box.
void computeBoundingBox ()
 Compute bounding box.
void centerByBoundingBox ()
 Center WEM by bounding box.
double getLUTMin () const
 Get minimum value for LUT range determination.
double getLUTMax () const
 Get maximum value for LUT range determination.
void setType (std::string type)
 Sets the type of the WEMPatch.
std::string getType () const
 Returns the type of the WEMPatch.
void setCreatorId (int id)
 Sets the creator ID of the WEMPatch.
int getCreatorId () const
 Returns the creator ID of the WEMPatch.
void setWEM (WEM *wem)
 Sets the internal pointer to the embracing WEM.
WEMgetWEM ()
 Returns the internal pointer to the embracing WEM.
const WEMgetWEM () const
 Returns the internal pointer to the embracing WEM.
void setLabel (std::string label)
 Sets the 'label' attribute of this WEMPatch.
std::string getLabel () const
 Returns the 'label' attribute of this WEMPatch.
void setDescription (std::string desc)
 Sets the 'description' attribute of this WEMPatch.
std::string getDescription () const
 Returns the 'description' attribute of this WEMPatch.
void setShowState (bool showState)
 Sets the 'show' status of this WEMPatch.
bool getShowState () const
 Returns the 'show' status of this WEMPatch.
void setEditableState (bool editableState)
 Sets the 'editable' status of this WEMPatch.
bool getEditableState () const
 Returns the 'editable' status of this WEMPatch.
void setSelectedState (bool selectedState)
 Sets the 'selected' status of this WEMPatch.
bool getSelectedState () const
 Returns the 'selected' status of this WEMPatch.
void setColorMode (ColorModes colorMode)
 Sets the 'colorMode' attribute of this WEMPatch.
ColorModes getColorMode () const
 Returns the 'colorMode' attribute of this WEMPatch.
void setDrawFaces (bool drawFaces)
 Sets the 'drawFaces' attribute of this WEMPatch.
bool getDrawFaces () const
 Returns the 'drawFaces' attribute of this WEMPatch.
void setUseFaceAmbientColor (bool useFaceAmbientColor)
 Sets the 'useFaceAmbientColor' attribute of this WEMPatch.
bool getUseFaceAmbientColor () const
 Returns the 'useFaceAmbientColor' attribute of this WEMPatch.
void setFaceAmbientColor (Vector3 faceAmbientColor)
 Sets the 'faceAmbientColor' attribute of this WEMPatch.
Vector3 getFaceAmbientColor () const
 Returns the 'faceAmbientColor' attribute of this WEMPatch.
void setUseFaceDiffuseColor (bool useFaceDiffuseColor)
 Sets the 'useFaceDiffuseColor' attribute of this WEMPatch.
bool getUseFaceDiffuseColor () const
 Returns the 'useFaceDiffuseColor' attribute of this WEMPatch.
void setFaceDiffuseColor (Vector3 faceDiffuseColor)
 Sets the 'faceDiffuseColor' attribute of this WEMPatch.
Vector3 getFaceDiffuseColor () const
 Returns the 'faceDiffuseColor' attribute of this WEMPatch.
void setUseFaceSpecularColor (bool useFaceSpecularColor)
 Sets the 'useFaceSpecularColor' attribute of this WEMPatch.
bool getUseFaceSpecularColor () const
 Returns the 'useFaceSpecularColor' attribute of this WEMPatch.
void setFaceSpecularColor (Vector3 faceSpecularColor)
 Sets the 'faceSpecularColor' attribute of this WEMPatch.
Vector3 getFaceSpecularColor () const
 Returns the 'faceSpecularColor' attribute of this WEMPatch.
void setFaceAlphaValue (float faceAlphaValue)
 Sets the 'faceAlphaValue' attribute of this WEMPatch.
float getFaceAlphaValue () const
 Returns the 'faceAlphaValue' attribute of this WEMPatch.
void setFaceShininessValue (float faceShininessValue)
 Sets the 'faceShininessValue' attribute of this WEMPatch.
float getFaceShininessValue () const
 Returns the 'faceShininessValue' attribute of this WEMPatch.
void setDrawFaceNormals (bool drawFaceNormals)
 Sets the 'drawFaceNormals' attribute of this WEMPatch.
bool getDrawFaceNormals () const
 Returns the 'drawFaceNormals' attribute of this WEMPatch.
void setFaceNormalsColor (Vector3 faceNormalsColor)
 Sets the 'faceNormalsColor' attribute of this WEMPatch.
Vector3 getFaceNormalsColor () const
 Returns the 'faceNormalsColor' attribute of this WEMPatch.
void setFaceNormalsScale (float faceNormalsScale)
 Sets the 'faceNormalsScale' attribute of this WEMPatch.
float getFaceNormalsScale () const
 Returns the 'faceNormalsScale' attribute of this WEMPatch.
void setDrawEdges (bool drawEdges)
 Sets the 'drawEdges' attribute of this WEMPatch.
bool getDrawEdges () const
 Returns the 'drawEdges' attribute of this WEMPatch.
void setEdgeColor (Vector3 edgeColor)
 Sets the 'edgeColor' attribute of this WEMPatch.
Vector3 getEdgeColor () const
 Returns the 'edgeColor' attribute of this WEMPatch.
void setLineWidth (float lineWidth)
 Sets the 'lineWidth' attribute of this WEMPatch.
float getLineWidth () const
 Returns the 'lineWidth' attribute of this WEMPatch.
void setUsePolygonOffset (bool usePolygonOffset)
 Sets the 'usePolygonOffset' attribute of this WEMPatch.
bool getUsePolygonOffset () const
 Returns the 'usePolygonOffset' attribute of this WEMPatch.
void setUseEdgeColoringMode (bool useEdgeColoringMode)
 Sets the 'useEdgeColoringMode' attribute of this WEMPatch.
bool getUseEdgeColoringMode () const
 Returns the 'useEdgeColoringMode' attribute of this WEMPatch.
void setDrawNodes (bool drawNodes)
 Sets the 'drawNodes' attribute of this WEMPatch.
bool getDrawNodes () const
 Returns the 'drawNodes' attribute of this WEMPatch.
void setNodeColor (Vector3 nodeColor)
 Sets the 'nodeColor' attribute of this WEMPatch.
Vector3 getNodeColor () const
 Returns the 'nodeColor' attribute of this WEMPatch.
void setDrawNodeNormals (bool drawNodeNormals)
 Sets the 'drawNodeNormals' attribute of this WEMPatch.
bool getDrawNodeNormals () const
 Returns the 'drawNodeNormals' attribute of this WEMPatch.
void setNodeNormalsColor (Vector3 nodeNormalsColor)
 Sets the 'nodeNormalsColor' attribute of this WEMPatch.
Vector3 getNodeNormalsColor () const
 Returns the 'nodeNormalsColor' attribute of this WEMPatch.
void setNodeNormalsScale (float nodeNormalsScale)
 Sets the 'nodeNormalsScale' attribute of this WEMPatch.
float getNodeNormalsScale () const
 Returns the 'nodeNormalsScale' attribute of this WEMPatch.
void setPointSize (float pointSize)
 Sets the 'pointSize' attribute of this WEMPatch.
float getPointSize () const
 Returns the 'pointSize' attribute of this WEMPatch.
void setNodeRenderingMode (NodeRenderingModes nodeRenderingMode)
 Sets the 'nodeRenderingMode' attribute of this WEMPatch.
NodeRenderingModes getNodeRenderingMode () const
 Returns the 'nodeRenderingMode' attribute of this WEMPatch.
void setDrawBoundingBoxes (bool drawBoundingBoxes)
 Sets the 'drawBoundingBoxes' attribute of this WEMPatch.
bool getDrawBoundingBoxes () const
 Returns the 'drawBoundingBoxes' attribute of this WEMPatch.
void setBoundingBoxMode (BoundingBoxModes bbMode)
 Sets the 'boundingBoxMode' attribute of this WEMPatch.
BoundingBoxModes getBoundingBoxMode () const
 Returns the 'boundingBoxMode' attribute of this WEMPatch.
void setBoundingBoxColor (Vector3 boundingBoxColor)
 Sets the 'boundingBoxColor' attribute of this WEMPatch.
Vector3 getBoundingBoxColor () const
 Returns the 'boundingBoxColor' attribute of this WEMPatch.
unsigned int getId () const
 Returns the unique ID of this WEMPatch.
void setId (unsigned int newId)
 Sets the unique ID of this WEMPatch. Beware: do not set this ID programmatically unless you really know what you do!
void deleteOrphanNodes ()
 Deletes orphan nodes (number of edges == number of faces == 0).
void triangulate (WEMTrianglePatch *wemPatch, TriangulationModes triangulationMode)
 Triangulate patch and add triangles to given triangle patch.
void mirror ()
 Mirror patch.
WEMPatchmakeCompatible (WEMRequirements *requirements, TriangulationModes triangulationMode)
 Make WEMPatch compatible with given requirements.
virtual void buildEdgeConnectivity ()
 Build edge connectivity for the whole WEM.
void buildLocalEdgeConnectivity (WEMFace *face)
 Build local edge connectivity, only provided face is rebuild.
virtual void saveTo (std::ostream &outstream, ProgressField *progress=NULL, float ratio=1.0f, float offset=0.0f)
 Save this WEM to given output stream.
virtual unsigned int loadFrom (std::istream &instream, short version, bool swapBytes, ProgressField *progressFld=NULL, float ratio=1.0f, float offset=0.0f)
 Load this WEM from given input stream.
virtual unsigned int loadFrom (char *map, short version, bool swapBytes, ProgressField *progressFld=NULL, float ratio=1.0f, float offset=0.0f)
 Load this WEM from given memory map.
WEMPrimitiveValueListregisterPrimitiveValueList (std::string description)
 Register new primitive value list.
WEMPrimitiveValueListgetPrimitiveValueList (std::string description)
 Get primitive value list based on description.
const WEMPrimitiveValueListgetPrimitiveValueList (std::string description) const
 Get primitive value list based on description.
std::vector< std::string > getRegisteredPrimitiveValueLists () const
 Get available primitive value lists as a vector.

Protected Member Functions

virtual void _addFaceUpdatePrimitiveValueLists ()
 Update primitive value lists on addFace.
virtual void _delFaceUpdatePrimitiveValueLists (WEMFace *face)
 Update primitive value lists on delFace.
virtual void _initMembers (unsigned int bs)
 Initializes member variables, used by the constructors.

Protected Attributes

WEMIndexVector< WEMNode > * _nodes
 The vector that holds all the nodes of the wem.
WEMIndexVector< WEMEdge > * _edges
 The vector that holds all the edges of the wem.
unsigned int _blocksize
 Initial blocksize for the WEMVector, WEMObjectVector variables used.
unsigned int _uniqueId
 Unique ID of this WEM.
WEM_wem
 A pointer to the WEM this WEMPart is in.
std::string _type
 Type of this WEMPatch.
int _creatorId
 ID of the creator of this WEMPatch.
WEMAttributes _attributes
 The attributes of this WEMPatch.
WEMBoundingBox_boundingBox
 The bounding box of this WEMPatch.
std::vector
< WEMPrimitiveValueList * > 
_primitiveValueLists
 The registered primitive value lists vector.


Detailed Description

Base class for triangle and quad patches.

Definition at line 31 of file WEMPatch.h.


Constructor & Destructor Documentation

ml::WEMPatch::WEMPatch ( unsigned int  bs = 8192  ) 

Standard constructor.

ml::WEMPatch::WEMPatch ( WEM wem,
unsigned int  bs = 8192 
)

Constructor which takes a pointer to the WEM this WEM is in.

In this method, the unique id is set.

ml::WEMPatch::WEMPatch ( const WEMPatch wemPatch  ) 

Copy constructor.

virtual ml::WEMPatch::~WEMPatch (  )  [virtual]

Standard destructor.


Member Function Documentation

virtual void ml::WEMPatch::_addFaceUpdatePrimitiveValueLists (  )  [protected, virtual]

Update primitive value lists on addFace.

virtual void ml::WEMPatch::_delFaceUpdatePrimitiveValueLists ( WEMFace face  )  [protected, virtual]

Update primitive value lists on delFace.

virtual void ml::WEMPatch::_initMembers ( unsigned int  bs  )  [protected, virtual]

Initializes member variables, used by the constructors.

WEMEdge* ml::WEMPatch::addEdge (  )  [inline]

Instantiates a new WEMEdge and adds it to the internal edges vector.

Returns a pointer to this newly added edge.

Definition at line 96 of file WEMPatch.h.

void ml::WEMPatch::addEdgeValues ( WEMEdge target,
WEMEdge source,
double  modifier 
)

Add edge values from edge source to given target edge.

Multiply by given modifier. Used in constructing new edges out of N edges by averaging.

virtual WEMFace* ml::WEMPatch::addFace (  )  [pure virtual]

Instantiates a new face and adds it to the internal faces vector. Returns a pointer to this newly added face.

Implemented in ml::WEMPolygonPatch, ml::WEMQuadPatch, and ml::WEMTrianglePatch.

void ml::WEMPatch::addFaceValues ( WEMFace target,
WEMFace source,
double  modifier 
)

Add face values from face source to given target face.

Multiply by given modifier. Used in constructing new faces out of N faces by averaging.

WEMNode* ml::WEMPatch::addNode (  ) 

Instantiates a new WEMNode and adds it to the internal nodes vector.

Returns a pointer to this newly added node. Also updates all node value lists with a new default value.

void ml::WEMPatch::addNodeValues ( WEMNode target,
WEMNode source,
double  modifier 
)

Add node values from node source to given target node.

Multiply by given modifier. Used in constructing new nodes out of N nodes by averaging.

void ml::WEMPatch::addPatch ( WEMPatch wemPatch  ) 

Add given patch.

void ml::WEMPatch::averageNodeValues ( WEMNode target,
WEMNode source1,
WEMNode source2 
)

Average given source node values and store values in given target node.

virtual void ml::WEMPatch::buildEdgeConnectivity (  )  [virtual]

Build edge connectivity for the whole WEM.

Only nodes and faces have to be set and known to each other.

void ml::WEMPatch::buildLocalEdgeConnectivity ( WEMFace face  ) 

Build local edge connectivity, only provided face is rebuild.

Only nodes and faces have to be set and known to each other.

void ml::WEMPatch::centerByBoundingBox (  ) 

Center WEM by bounding box.

void ml::WEMPatch::computeBoundingBox (  ) 

Compute bounding box.

void ml::WEMPatch::computeNormals (  ) 

Compute normals.

void ml::WEMPatch::delEdge ( WEMEdge edge  )  [inline]

Deletes an edge and erases it from the internal edges vector.

Definition at line 98 of file WEMPatch.h.

void ml::WEMPatch::deleteOrphanNodes (  ) 

Deletes orphan nodes (number of edges == number of faces == 0).

void ml::WEMPatch::delNode ( WEMNode node  ) 

Deletes a node and erases it from the internal nodes vector.

Also updates all node value lists by deleting the corresponding value.

void ml::WEMPatch::dispose (  ) 

Dispose of internal data structures.

Reimplemented in ml::WEMPolygonPatch, ml::WEMQuadPatch, and ml::WEMTrianglePatch.

void ml::WEMPatch::extendEdgeValueLists ( unsigned int  number,
double  value 
)

Extend all edge value lists with given value.

void ml::WEMPatch::extendFaceValueLists ( unsigned int  number,
double  value 
)

Extend all face value lists with given value.

void ml::WEMPatch::extendNodeValueLists ( unsigned int  number,
double  value 
)

Extend all node value lists with given value.

double ml::WEMPatch::getArea (  )  const

Returns the area of this patch in square mm.

unsigned int ml::WEMPatch::getBlocksize (  )  const [inline]

Get block size for WEM.

Definition at line 49 of file WEMPatch.h.

const WEMBoundingBox* ml::WEMPatch::getBoundingBox (  )  const [inline]

Get the bounding box.

Definition at line 147 of file WEMPatch.h.

References getBoundingBox().

Referenced by getBoundingBox().

WEMBoundingBox* ml::WEMPatch::getBoundingBox (  )  [inline]

Get the bounding box.

Definition at line 145 of file WEMPatch.h.

Vector3 ml::WEMPatch::getBoundingBoxColor (  )  const [inline]

Returns the 'boundingBoxColor' attribute of this WEMPatch.

Definition at line 319 of file WEMPatch.h.

BoundingBoxModes ml::WEMPatch::getBoundingBoxMode (  )  const [inline]

Returns the 'boundingBoxMode' attribute of this WEMPatch.

Definition at line 315 of file WEMPatch.h.

ColorModes ml::WEMPatch::getColorMode (  )  const [inline]

Returns the 'colorMode' attribute of this WEMPatch.

Definition at line 208 of file WEMPatch.h.

int ml::WEMPatch::getCreatorId (  )  const [inline]

Returns the creator ID of the WEMPatch.

Definition at line 169 of file WEMPatch.h.

std::string ml::WEMPatch::getDescription (  )  const [inline]

Returns the 'description' attribute of this WEMPatch.

Definition at line 190 of file WEMPatch.h.

bool ml::WEMPatch::getDrawBoundingBoxes (  )  const [inline]

Returns the 'drawBoundingBoxes' attribute of this WEMPatch.

Definition at line 311 of file WEMPatch.h.

bool ml::WEMPatch::getDrawEdges (  )  const [inline]

Returns the 'drawEdges' attribute of this WEMPatch.

Definition at line 261 of file WEMPatch.h.

bool ml::WEMPatch::getDrawFaceNormals (  )  const [inline]

Returns the 'drawFaceNormals' attribute of this WEMPatch.

Definition at line 248 of file WEMPatch.h.

bool ml::WEMPatch::getDrawFaces (  )  const [inline]

Returns the 'drawFaces' attribute of this WEMPatch.

Definition at line 212 of file WEMPatch.h.

bool ml::WEMPatch::getDrawNodeNormals (  )  const [inline]

Returns the 'drawNodeNormals' attribute of this WEMPatch.

Definition at line 290 of file WEMPatch.h.

bool ml::WEMPatch::getDrawNodes (  )  const [inline]

Returns the 'drawNodes' attribute of this WEMPatch.

Definition at line 282 of file WEMPatch.h.

const WEMEdge* ml::WEMPatch::getEdgeAt ( unsigned int  index  )  const [inline]

Get edge at given index.

Definition at line 93 of file WEMPatch.h.

References getEdgeAt().

Referenced by getEdgeAt().

WEMEdge* ml::WEMPatch::getEdgeAt ( unsigned int  index  )  [inline]

Get edge at given index.

Definition at line 91 of file WEMPatch.h.

Vector3 ml::WEMPatch::getEdgeColor (  )  const [inline]

Returns the 'edgeColor' attribute of this WEMPatch.

Definition at line 265 of file WEMPatch.h.

const WEMIndexVector<WEMEdge>* ml::WEMPatch::getEdges (  )  const [inline]

Get pointer to edges.

Definition at line 89 of file WEMPatch.h.

References getEdges().

Referenced by getEdges().

WEMIndexVector<WEMEdge>* ml::WEMPatch::getEdges (  )  [inline]

Get pointer to edges.

Definition at line 87 of file WEMPatch.h.

bool ml::WEMPatch::getEditableState (  )  const [inline]

Returns the 'editable' status of this WEMPatch.

Definition at line 199 of file WEMPatch.h.

float ml::WEMPatch::getFaceAlphaValue (  )  const [inline]

Returns the 'faceAlphaValue' attribute of this WEMPatch.

Definition at line 240 of file WEMPatch.h.

Vector3 ml::WEMPatch::getFaceAmbientColor (  )  const [inline]

Returns the 'faceAmbientColor' attribute of this WEMPatch.

Definition at line 220 of file WEMPatch.h.

virtual const WEMFace* ml::WEMPatch::getFaceAt ( unsigned int  index  )  const [pure virtual]

Get face at given index.

Implemented in ml::WEMPolygonPatch, ml::WEMQuadPatch, and ml::WEMTrianglePatch.

virtual WEMFace* ml::WEMPatch::getFaceAt ( unsigned int  index  )  [pure virtual]

Get face at given index.

Implemented in ml::WEMPolygonPatch, ml::WEMQuadPatch, and ml::WEMTrianglePatch.

Vector3 ml::WEMPatch::getFaceDiffuseColor (  )  const [inline]

Returns the 'faceDiffuseColor' attribute of this WEMPatch.

Definition at line 228 of file WEMPatch.h.

Vector3 ml::WEMPatch::getFaceNormalsColor (  )  const [inline]

Returns the 'faceNormalsColor' attribute of this WEMPatch.

Definition at line 252 of file WEMPatch.h.

float ml::WEMPatch::getFaceNormalsScale (  )  const [inline]

Returns the 'faceNormalsScale' attribute of this WEMPatch.

Definition at line 256 of file WEMPatch.h.

float ml::WEMPatch::getFaceShininessValue (  )  const [inline]

Returns the 'faceShininessValue' attribute of this WEMPatch.

Definition at line 244 of file WEMPatch.h.

Vector3 ml::WEMPatch::getFaceSpecularColor (  )  const [inline]

Returns the 'faceSpecularColor' attribute of this WEMPatch.

Definition at line 236 of file WEMPatch.h.

unsigned int ml::WEMPatch::getId ( void   )  const [inline]

Returns the unique ID of this WEMPatch.

Definition at line 324 of file WEMPatch.h.

std::string ml::WEMPatch::getLabel (  )  const [inline]

Returns the 'label' attribute of this WEMPatch.

Definition at line 185 of file WEMPatch.h.

float ml::WEMPatch::getLineWidth (  )  const [inline]

Returns the 'lineWidth' attribute of this WEMPatch.

Definition at line 269 of file WEMPatch.h.

double ml::WEMPatch::getLUTMax (  )  const [inline]

Get maximum value for LUT range determination.

Definition at line 158 of file WEMPatch.h.

double ml::WEMPatch::getLUTMin (  )  const [inline]

Get minimum value for LUT range determination.

Definition at line 156 of file WEMPatch.h.

const WEMNode* ml::WEMPatch::getNodeAt ( unsigned int  index  )  const [inline]

Get node at given index.

Definition at line 66 of file WEMPatch.h.

References getNodeAt().

Referenced by getNodeAt().

WEMNode* ml::WEMPatch::getNodeAt ( unsigned int  index  )  [inline]

Get node at given index.

Definition at line 64 of file WEMPatch.h.

Vector3 ml::WEMPatch::getNodeColor (  )  const [inline]

Returns the 'nodeColor' attribute of this WEMPatch.

Definition at line 286 of file WEMPatch.h.

Vector3 ml::WEMPatch::getNodeNormalsColor (  )  const [inline]

Returns the 'nodeNormalsColor' attribute of this WEMPatch.

Definition at line 294 of file WEMPatch.h.

float ml::WEMPatch::getNodeNormalsScale (  )  const [inline]

Returns the 'nodeNormalsScale' attribute of this WEMPatch.

Definition at line 298 of file WEMPatch.h.

NodeRenderingModes ml::WEMPatch::getNodeRenderingMode (  )  const [inline]

Returns the 'nodeRenderingMode' attribute of this WEMPatch.

Definition at line 306 of file WEMPatch.h.

const WEMIndexVector<WEMNode>* ml::WEMPatch::getNodes (  )  const [inline]

Get pointer to nodes.

Definition at line 62 of file WEMPatch.h.

References getNodes().

Referenced by getNodes().

WEMIndexVector<WEMNode>* ml::WEMPatch::getNodes (  )  [inline]

Get pointer to nodes.

Definition at line 60 of file WEMPatch.h.

unsigned int ml::WEMPatch::getNumEdges (  )  const [inline]

Returns the number of edges in the WEM.

Definition at line 85 of file WEMPatch.h.

virtual unsigned int ml::WEMPatch::getNumFaces (  )  const [inline, virtual]

Returns the number of faces in the WEM.

Reimplemented in ml::WEMPolygonPatch, ml::WEMQuadPatch, and ml::WEMTrianglePatch.

Definition at line 53 of file WEMPatch.h.

unsigned int ml::WEMPatch::getNumNodes (  )  const [inline]

Returns the number of nodes in the WEM.

Definition at line 58 of file WEMPatch.h.

virtual PatchTypes ml::WEMPatch::getPatchType (  )  const [pure virtual]

Get mesh type.

Implemented in ml::WEMPolygonPatch, ml::WEMQuadPatch, and ml::WEMTrianglePatch.

float ml::WEMPatch::getPointSize (  )  const [inline]

Returns the 'pointSize' attribute of this WEMPatch.

Definition at line 302 of file WEMPatch.h.

const WEMPrimitiveValueList* ml::WEMPatch::getPrimitiveValueList ( std::string  description  )  const [inline]

Get primitive value list based on description.

If the description does not exist, a NULL pointer is returned. When the description is empty, a NULL pointer is returned!!

Definition at line 378 of file WEMPatch.h.

References getPrimitiveValueList().

Referenced by getPrimitiveValueList().

WEMPrimitiveValueList* ml::WEMPatch::getPrimitiveValueList ( std::string  description  ) 

Get primitive value list based on description.

If the description does not exist, a new primitive value list is created. When the description is empty, a NULL pointer is returned!!

std::vector<std::string> ml::WEMPatch::getRegisteredPrimitiveValueLists (  )  const

Get available primitive value lists as a vector.

bool ml::WEMPatch::getSelectedState (  )  const [inline]

Returns the 'selected' status of this WEMPatch.

Definition at line 203 of file WEMPatch.h.

bool ml::WEMPatch::getShowState (  )  const [inline]

Returns the 'show' status of this WEMPatch.

Definition at line 195 of file WEMPatch.h.

std::string ml::WEMPatch::getType (  )  const [inline]

Returns the type of the WEMPatch.

Definition at line 165 of file WEMPatch.h.

bool ml::WEMPatch::getUseEdgeColoringMode (  )  const [inline]

Returns the 'useEdgeColoringMode' attribute of this WEMPatch.

Definition at line 277 of file WEMPatch.h.

bool ml::WEMPatch::getUseFaceAmbientColor (  )  const [inline]

Returns the 'useFaceAmbientColor' attribute of this WEMPatch.

Definition at line 216 of file WEMPatch.h.

bool ml::WEMPatch::getUseFaceDiffuseColor (  )  const [inline]

Returns the 'useFaceDiffuseColor' attribute of this WEMPatch.

Definition at line 224 of file WEMPatch.h.

bool ml::WEMPatch::getUseFaceSpecularColor (  )  const [inline]

Returns the 'useFaceSpecularColor' attribute of this WEMPatch.

Definition at line 232 of file WEMPatch.h.

bool ml::WEMPatch::getUsePolygonOffset (  )  const [inline]

Returns the 'usePolygonOffset' attribute of this WEMPatch.

Definition at line 273 of file WEMPatch.h.

double ml::WEMPatch::getVolume (  )  const

Returns the volume of this patch in cubic mm.

const WEM* ml::WEMPatch::getWEM (  )  const [inline]

Returns the internal pointer to the embracing WEM.

Definition at line 178 of file WEMPatch.h.

References getWEM().

Referenced by getWEM().

WEM* ml::WEMPatch::getWEM (  )  [inline]

Returns the internal pointer to the embracing WEM.

Definition at line 176 of file WEMPatch.h.

bool ml::WEMPatch::hasEdges (  )  const [inline]

Has this WEM edges?

Definition at line 100 of file WEMPatch.h.

virtual unsigned int ml::WEMPatch::loadFrom ( char *  map,
short  version,
bool  swapBytes,
ProgressField progressFld = NULL,
float  ratio = 1.0f,
float  offset = 0.0f 
) [virtual]

Load this WEM from given memory map.

virtual unsigned int ml::WEMPatch::loadFrom ( std::istream &  instream,
short  version,
bool  swapBytes,
ProgressField progressFld = NULL,
float  ratio = 1.0f,
float  offset = 0.0f 
) [virtual]

Load this WEM from given input stream.

WEMPatch* ml::WEMPatch::makeCompatible ( WEMRequirements requirements,
TriangulationModes  triangulationMode 
)

Make WEMPatch compatible with given requirements.

void ml::WEMPatch::mirror (  ) 

Mirror patch.

bool ml::WEMPatch::pointsOutwards (  )  const

Checks whether this patch has most normals pointing outwards.

WEMPrimitiveValueList* ml::WEMPatch::registerPrimitiveValueList ( std::string  description  ) 

Register new primitive value list.

When the description is empty, a NULL pointer is returned!!

virtual void ml::WEMPatch::saveTo ( std::ostream &  outstream,
ProgressField progress = NULL,
float  ratio = 1.0f,
float  offset = 0.0f 
) [virtual]

Save this WEM to given output stream.

void ml::WEMPatch::setBoundingBoxColor ( Vector3  boundingBoxColor  )  [inline]

Sets the 'boundingBoxColor' attribute of this WEMPatch.

Definition at line 317 of file WEMPatch.h.

void ml::WEMPatch::setBoundingBoxMode ( BoundingBoxModes  bbMode  )  [inline]

Sets the 'boundingBoxMode' attribute of this WEMPatch.

Definition at line 313 of file WEMPatch.h.

void ml::WEMPatch::setColorMode ( ColorModes  colorMode  )  [inline]

Sets the 'colorMode' attribute of this WEMPatch.

Definition at line 206 of file WEMPatch.h.

void ml::WEMPatch::setCreatorId ( int  id  )  [inline]

Sets the creator ID of the WEMPatch.

Definition at line 167 of file WEMPatch.h.

void ml::WEMPatch::setDescription ( std::string  desc  )  [inline]

Sets the 'description' attribute of this WEMPatch.

Definition at line 188 of file WEMPatch.h.

void ml::WEMPatch::setDrawBoundingBoxes ( bool  drawBoundingBoxes  )  [inline]

Sets the 'drawBoundingBoxes' attribute of this WEMPatch.

Definition at line 309 of file WEMPatch.h.

void ml::WEMPatch::setDrawEdges ( bool  drawEdges  )  [inline]

Sets the 'drawEdges' attribute of this WEMPatch.

Definition at line 259 of file WEMPatch.h.

void ml::WEMPatch::setDrawFaceNormals ( bool  drawFaceNormals  )  [inline]

Sets the 'drawFaceNormals' attribute of this WEMPatch.

Definition at line 246 of file WEMPatch.h.

void ml::WEMPatch::setDrawFaces ( bool  drawFaces  )  [inline]

Sets the 'drawFaces' attribute of this WEMPatch.

Definition at line 210 of file WEMPatch.h.

void ml::WEMPatch::setDrawNodeNormals ( bool  drawNodeNormals  )  [inline]

Sets the 'drawNodeNormals' attribute of this WEMPatch.

Definition at line 288 of file WEMPatch.h.

void ml::WEMPatch::setDrawNodes ( bool  drawNodes  )  [inline]

Sets the 'drawNodes' attribute of this WEMPatch.

Definition at line 280 of file WEMPatch.h.

void ml::WEMPatch::setEdgeColor ( Vector3  edgeColor  )  [inline]

Sets the 'edgeColor' attribute of this WEMPatch.

Definition at line 263 of file WEMPatch.h.

void ml::WEMPatch::setEdgeTraversalState ( bool  state  ) 

Sets the specified traversal state to all edges.

void ml::WEMPatch::setEditableState ( bool  editableState  )  [inline]

Sets the 'editable' status of this WEMPatch.

Definition at line 197 of file WEMPatch.h.

void ml::WEMPatch::setFaceAlphaValue ( float  faceAlphaValue  )  [inline]

Sets the 'faceAlphaValue' attribute of this WEMPatch.

Definition at line 238 of file WEMPatch.h.

void ml::WEMPatch::setFaceAmbientColor ( Vector3  faceAmbientColor  )  [inline]

Sets the 'faceAmbientColor' attribute of this WEMPatch.

Definition at line 218 of file WEMPatch.h.

void ml::WEMPatch::setFaceDiffuseColor ( Vector3  faceDiffuseColor  )  [inline]

Sets the 'faceDiffuseColor' attribute of this WEMPatch.

Definition at line 226 of file WEMPatch.h.

void ml::WEMPatch::setFaceNormalsColor ( Vector3  faceNormalsColor  )  [inline]

Sets the 'faceNormalsColor' attribute of this WEMPatch.

Definition at line 250 of file WEMPatch.h.

void ml::WEMPatch::setFaceNormalsScale ( float  faceNormalsScale  )  [inline]

Sets the 'faceNormalsScale' attribute of this WEMPatch.

Definition at line 254 of file WEMPatch.h.

void ml::WEMPatch::setFaceShininessValue ( float  faceShininessValue  )  [inline]

Sets the 'faceShininessValue' attribute of this WEMPatch.

Definition at line 242 of file WEMPatch.h.

void ml::WEMPatch::setFaceSpecularColor ( Vector3  faceSpecularColor  )  [inline]

Sets the 'faceSpecularColor' attribute of this WEMPatch.

Definition at line 234 of file WEMPatch.h.

void ml::WEMPatch::setFaceTraversalState ( bool  state  ) 

Sets the specified traversal state to all faces.

void ml::WEMPatch::setId ( unsigned int  newId  )  [inline]

Sets the unique ID of this WEMPatch. Beware: do not set this ID programmatically unless you really know what you do!

Definition at line 327 of file WEMPatch.h.

void ml::WEMPatch::setLabel ( std::string  label  )  [inline]

Sets the 'label' attribute of this WEMPatch.

Definition at line 183 of file WEMPatch.h.

void ml::WEMPatch::setLineWidth ( float  lineWidth  )  [inline]

Sets the 'lineWidth' attribute of this WEMPatch.

Definition at line 267 of file WEMPatch.h.

void ml::WEMPatch::setNodeColor ( Vector3  nodeColor  )  [inline]

Sets the 'nodeColor' attribute of this WEMPatch.

Definition at line 284 of file WEMPatch.h.

void ml::WEMPatch::setNodeNormalsColor ( Vector3  nodeNormalsColor  )  [inline]

Sets the 'nodeNormalsColor' attribute of this WEMPatch.

Definition at line 292 of file WEMPatch.h.

void ml::WEMPatch::setNodeNormalsScale ( float  nodeNormalsScale  )  [inline]

Sets the 'nodeNormalsScale' attribute of this WEMPatch.

Definition at line 296 of file WEMPatch.h.

void ml::WEMPatch::setNodeRenderingMode ( NodeRenderingModes  nodeRenderingMode  )  [inline]

Sets the 'nodeRenderingMode' attribute of this WEMPatch.

Definition at line 304 of file WEMPatch.h.

void ml::WEMPatch::setNodeTraversalState ( bool  state  ) 

Sets the specified traversal state to all nodes.

void ml::WEMPatch::setPointSize ( float  pointSize  )  [inline]

Sets the 'pointSize' attribute of this WEMPatch.

Definition at line 300 of file WEMPatch.h.

void ml::WEMPatch::setSelectedState ( bool  selectedState  )  [inline]

Sets the 'selected' status of this WEMPatch.

Definition at line 201 of file WEMPatch.h.

void ml::WEMPatch::setShowState ( bool  showState  )  [inline]

Sets the 'show' status of this WEMPatch.

Definition at line 193 of file WEMPatch.h.

void ml::WEMPatch::setType ( std::string  type  )  [inline]

Sets the type of the WEMPatch.

Definition at line 163 of file WEMPatch.h.

void ml::WEMPatch::setUseEdgeColoringMode ( bool  useEdgeColoringMode  )  [inline]

Sets the 'useEdgeColoringMode' attribute of this WEMPatch.

Definition at line 275 of file WEMPatch.h.

void ml::WEMPatch::setUseFaceAmbientColor ( bool  useFaceAmbientColor  )  [inline]

Sets the 'useFaceAmbientColor' attribute of this WEMPatch.

Definition at line 214 of file WEMPatch.h.

void ml::WEMPatch::setUseFaceDiffuseColor ( bool  useFaceDiffuseColor  )  [inline]

Sets the 'useFaceDiffuseColor' attribute of this WEMPatch.

Definition at line 222 of file WEMPatch.h.

void ml::WEMPatch::setUseFaceSpecularColor ( bool  useFaceSpecularColor  )  [inline]

Sets the 'useFaceSpecularColor' attribute of this WEMPatch.

Definition at line 230 of file WEMPatch.h.

void ml::WEMPatch::setUsePolygonOffset ( bool  usePolygonOffset  )  [inline]

Sets the 'usePolygonOffset' attribute of this WEMPatch.

Definition at line 271 of file WEMPatch.h.

void ml::WEMPatch::setWEM ( WEM wem  )  [inline]

Sets the internal pointer to the embracing WEM.

Definition at line 174 of file WEMPatch.h.

void ml::WEMPatch::triangulate ( WEMTrianglePatch wemPatch,
TriangulationModes  triangulationMode 
)

Triangulate patch and add triangles to given triangle patch.


Member Data Documentation

The attributes of this WEMPatch.

Definition at line 410 of file WEMPatch.h.

unsigned int ml::WEMPatch::_blocksize [protected]

Initial blocksize for the WEMVector, WEMObjectVector variables used.

Definition at line 398 of file WEMPatch.h.

The bounding box of this WEMPatch.

Definition at line 412 of file WEMPatch.h.

int ml::WEMPatch::_creatorId [protected]

ID of the creator of this WEMPatch.

Definition at line 407 of file WEMPatch.h.

The vector that holds all the edges of the wem.

Definition at line 396 of file WEMPatch.h.

The vector that holds all the nodes of the wem.

Definition at line 394 of file WEMPatch.h.

The registered primitive value lists vector.

Definition at line 415 of file WEMPatch.h.

std::string ml::WEMPatch::_type [protected]

Type of this WEMPatch.

Definition at line 405 of file WEMPatch.h.

unsigned int ml::WEMPatch::_uniqueId [protected]

Unique ID of this WEM.

Definition at line 401 of file WEMPatch.h.

WEM* ml::WEMPatch::_wem [protected]

A pointer to the WEM this WEMPart is in.

Definition at line 403 of file WEMPatch.h.


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

Generated on Sat Sep 3 18:39:41 2011 for MeVisLab Toolbox Reference by  doxygen 1.5.8