Public Member Functions

MeshSelectionConverter Class Reference

Search for all occurrences

#include <meshadj.h>

Inheritance diagram for MeshSelectionConverter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  MeshSelectionConverter ()
DllExport void  FaceToElement (Mesh &mesh, AdjFaceList *af, BitArray &faceSel, BitArray &elementSel)
DllExport void  FaceToPolygon (Mesh &mesh, AdjFaceList *af, BitArray &faceSel, BitArray &polygonSel, float faceThresh, bool ignoreVisEdge=false)
DllExport void  VertexToEdge (Mesh &mesh, BitArray &vertexSel, BitArray &edgeSel)
DllExport void  VertexToFace (Mesh &mesh, BitArray &vertexSel, BitArray &faceSel)
DllExport void  VertexToPolygon (Mesh &mesh, AdjFaceList *af, BitArray &vertexSel, BitArray &polygonSel, float faceThresh, bool ignoreVisEdge=false)
DllExport void  VertexToElement (Mesh &mesh, AdjFaceList *af, BitArray &vertexSel, BitArray &elementSel)
BitArray GetCull ()
void  SetFlag (DWORD f, bool value=true)
void  ClearFlag (DWORD f)
bool  GetFlag (DWORD f)
Interface_ID  GetID ()
DllExport void  DeleteInterface ()
DllExport BaseInterface GetInterface (Interface_ID id)
DllExport BaseInterface CloneInterface (void *remapDir=NULL)

Constructor & Destructor Documentation

DllExport MeshSelectionConverter ( )

Member Function Documentation

DllExport void FaceToElement ( Mesh mesh,
AdjFaceList af,
BitArray faceSel,
BitArray elementSel 
)
Remarks:
Converts a face selection to an element selection.

NOTE: This method can only produce accurate results with culling if we are

certain that the face selection corresponds to the results of the last call to

the owner Mesh's SubObjectHitTest method. (To turn off culling, use GetCull ().ClearAll(). Culling is not relevant if the MESH_SELCONV_REQUIRE_ALL flag

is turned off.)
Parameters:
Mesh & mesh

The mesh that owns this interface

AdjFaceList *af

A pointer to an accurate AdjFaceList based on this mesh. (This is used to

construct elements.)

BitArray & faceSel

The face selection representing actual hits in the viewport.

BitArray & elementSel

This is where the output Element selection is stored.

DllExport void FaceToPolygon ( Mesh mesh,
AdjFaceList af,
BitArray faceSel,
BitArray polygonSel,
float  faceThresh,
bool  ignoreVisEdge = false 
)
Remarks:
Converts a face selection to a polygon selection.

NOTE: This method can only produce accurate results with culling if we are

certain that the face selection corresponds to the results of the last call to

the owner Mesh's SubObjectHitTest method. (To turn off culling, use GetCull ().ClearAll(). Culling is not relevant if the MESH_SELCONV_REQUIRE_ALL flag

is turned off.)
Parameters:
Mesh & mesh

The mesh that owns this interface

AdjFaceList *af

A pointer to an accurate AdjFaceList based on this mesh. (This is used to

construct elements.)

BitArray & faceSel

The face selection representing actual hits in the viewport.

BitArray & polygonSel

This is where the output polygon selection is stored

float faceThresh

The angle threshold between faces, in radians, that would mark them as

belonging to separate polygons.

bool ignoreVisEdge=false

If true, this tells the system to ignore visible edges in constructing

polygons, and instead rely entirely on the face threshold to distinguish them.

DllExport void VertexToEdge ( Mesh mesh,
BitArray vertexSel,
BitArray edgeSel 
)
Remarks:
Converts a vertex selection to a "By Vertex" edge selection.

NOTE: This method can only produce accurate results with culling if we are

certain that the vertex selection corresponds to the results of the last call

to the owner Mesh's SubObjectHitTest method. (To turn off culling, use GetCull ().ClearAll(). Culling is not relevant if the MESH_SELCONV_REQUIRE_ALL flag

is turned off.)

Parameters:
Mesh & mesh

The mesh that owns this interface

BitArray & vertexSel

The face selection representing actual hits in the viewport

BitArray & edgeSel

The face selection representing actual hits in the viewport

DllExport void VertexToFace ( Mesh mesh,
BitArray vertexSel,
BitArray faceSel 
)
DllExport void VertexToPolygon ( Mesh mesh,
AdjFaceList af,
BitArray vertexSel,
BitArray polygonSel,
float  faceThresh,
bool  ignoreVisEdge = false 
)
Remarks:
Converts a vertex selection to a "By Vertex" polygon selection.

NOTE: This method can only produce accurate results with culling if we are

certain that the vertex selection corresponds to the results of the last call

to the owner Mesh's SubObjectHitTest method. (To turn off culling, use GetCull ().ClearAll(). Culling is not relevant if the MESH_SELCONV_REQUIRE_ALL flag

is turned off.)

(Note that we can't just combine VertexToFace and FaceToPolygon to obtain the

results of this method, because we won't have accurate Face culling info.)
Parameters:
Mesh & mesh

The mesh that owns this interface

AdjFaceList *af

A pointer to an accurate AdjFaceList based on this mesh. (This is used to

construct elements.)

BitArray &vertexSel

The vertex selection representing actual hits in the viewport.

BitArray & polygonSel

This is where the output polygon selection is stored

float faceThresh

The angle threshold between faces, in radians, that would mark them as

belonging to separate polygons.

bool ignoreVisEdge=false

If true, this tells the system to ignore visible edges in constructing

polygons, and instead rely entirely on the face threshold to distinguish them.

DllExport void VertexToElement ( Mesh mesh,
AdjFaceList af,
BitArray vertexSel,
BitArray elementSel 
)
Remarks:
Converts a vertex selection to a "By Vertex" element selection.

NOTE: This method can only produce accurate results with culling if we are

certain that the vertex selection corresponds to the results of the last call

to the owner Mesh's SubObjectHitTest method. (To turn off culling, use GetCull ().ClearAll(). Culling is not relevant if the MESH_SELCONV_REQUIRE_ALL flag

is turned off.)

(Note that we can't just combine VertexToFace and FaceToElement to obtain the

results of this method, because we won't have accurate Face culling info.)
Parameters:
Mesh & mesh

The mesh that owns this interface

AdjFaceList *af

A pointer to an accurate AdjFaceList based on this mesh. (This is used to

construct elements.)

BitArray &vertexSel

The vertex selection representing actual hits in the viewport.

BitArray &elementSel

This is where the output element selection is stored

BitArray& GetCull ( ) [inline]
Remarks:
Accesses the BitArray describing which subobject components were culled in

last Mesh hit-testing. In its usual usage, this data will only be set by

Mesh::SubObjectHitTest, and will only be used by the other methods of

MeshSelectionConverter. This information does not affect selection conversion

if the MESH_SELCONV_REQUIRE_ALL flag is not set.
{ return mCull; }
void SetFlag ( DWORD  f,
bool  value = true 
) [inline]
{ if (value) mFlags |= f; else mFlags &= ~f; }
void ClearFlag ( DWORD  f ) [inline]
{ mFlags &= ~f; }
bool GetFlag ( DWORD  f ) [inline]
{ return (mFlags&f) ? true : false; }
Interface_ID GetID ( ) [inline, virtual]
Remarks:
This method returns the unique interface ID.

Reimplemented from BaseInterface.

{return MESHSELECTCONVERT_INTERFACE;}
DllExport void DeleteInterface ( ) [virtual]
Remarks:
This method can be used as a direct interface delete request.
Default Implementation:
{ }

Reimplemented from BaseInterface.

DllExport BaseInterface* GetInterface ( Interface_ID  id ) [virtual]
Remarks:
Returns a pointer to the interface whose ID is specified.
Parameters:
Interface_ID id

The ID of the interface to return.
Default Implementation:
{ return NULL; }

Reimplemented from BaseInterface.

DllExport BaseInterface* CloneInterface ( void *  remapDir = NULL ) [virtual]
Remarks:
This method allows you to clone the base interface.
Parameters:
void* remapDir

The RemapDir passed to the clone method.
Default Implementation:
{ return NULL; }

Reimplemented from BaseInterface.


MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter
MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter MeshSelectionConverter