#include <WTypes.h>
#include "maxheap.h"
#include "export.h"
#include "point3.h"
#include "TabTypes.h"
#include "mesh.h"
Go to the source code of this
file.
Classes
|
class
|
MEdge |
class
|
AdjEdgeList |
class
|
AdjFace |
class
|
AdjFaceList |
class
|
FaceElementList |
class
|
FaceClusterList |
class
|
EdgeClusterList |
class
|
MeshChamferData |
class
|
MeshTempData |
class
|
MeshSelectionConverter |
Defines
|
#define |
UNDEFINED 0xffffffff |
#define |
MESH_EXTRUDE_CLUSTER 1 |
#define |
MESH_EXTRUDE_LOCAL 2 |
#define |
SOFTSEL_MIN_FALLOFF 0.0f |
#define |
SOFTSEL_MAX_FALLOFF 999999.0f |
#define |
SOFTSEL_DEFAULT_FALLOFF 20.0f |
#define |
SOFTSEL_MIN_PINCH -1000.0f |
#define |
SOFTSEL_MAX_PINCH 1000.0f |
#define |
SOFTSEL_DEFAULT_PINCH 0.0f |
#define |
SOFTSEL_MIN_BUBBLE -1000.0f |
#define |
SOFTSEL_MAX_BUBBLE 1000.0f |
#define |
SOFTSEL_DEFAULT_BUBBLE 0.0f |
#define |
MESHSELECTCONVERT_INTERFACE Interface_ID(0x3da7dd5,
0x7ecf0391) |
#define |
MESH_SELCONV_REQUIRE_ALL 0x01 |
Functions
|
DllExport
void |
MeshChamferDataDebugPrint
(MeshChamferData &mcd, int
mapNum) |
DllExport
float |
AffectRegionFunction
(float dist, float falloff, float pinch, float bubble) |
DllExport
Point3 |
SoftSelectionColor
(float selAmount) |
DllExport
void |
MatrixFromNormal
(Point3 &normal,
Matrix3 &mat) |
DllExport
void |
AverageVertexNormals
(Mesh &mesh, Tab< Point3 > &vnormals) |
DllExport
Point3 |
AverageSelVertNormal
(Mesh &mesh) |
DllExport
Point3 |
AverageSelVertCenter
(Mesh &mesh) |
DllExport
void |
DeselectHiddenFaces
(Mesh &mesh) |
DllExport
void |
DeselectHiddenEdges
(Mesh &mesh) |
DllExport
void |
HiddenFacesToVerts
(Mesh &mesh, BitArray alsoHide) |
DllExport
void |
SelectionDistance
(Mesh &mesh, float
*selDist, float falloffLimit=-1.0f) |
DllExport
void |
SelectionDistance
(Mesh &mesh, float
*selDist, int iters, AdjEdgeList *ae=NULL) |
DllExport
void |
ClustDistances
(Mesh &mesh, DWORD
numClusts, DWORD *vclust, Tab< float > **clustDist) |
DllExport
void |
ClustDistances
(Mesh &mesh, DWORD
numClusts, DWORD *vclust, Tab< float > **clustDist, int iters,
AdjEdgeList
*ae=NULL) |
Define Documentation
#define
UNDEFINED 0xffffffff |
#define
MESH_EXTRUDE_CLUSTER 1 |
#define
MESH_EXTRUDE_LOCAL 2 |
#define
SOFTSEL_MIN_FALLOFF 0.0f |
#define
SOFTSEL_MAX_FALLOFF 999999.0f |
#define
SOFTSEL_DEFAULT_FALLOFF 20.0f |
#define
SOFTSEL_MIN_PINCH -1000.0f |
#define
SOFTSEL_MAX_PINCH 1000.0f |
#define
SOFTSEL_DEFAULT_PINCH 0.0f |
#define
SOFTSEL_MIN_BUBBLE -1000.0f |
#define
SOFTSEL_MAX_BUBBLE 1000.0f |
#define
SOFTSEL_DEFAULT_BUBBLE 0.0f |
#define
MESHSELECTCONVERT_INTERFACE Interface_ID(0x3da7dd5,
0x7ecf0391) |
#define
MESH_SELCONV_REQUIRE_ALL 0x01 |
Function Documentation
DllExport void MeshChamferDataDebugPrint |
( |
MeshChamferData & |
mcd, |
|
|
int |
mapNum |
|
) |
|
|
DllExport float AffectRegionFunction |
( |
float |
dist, |
|
|
float |
falloff, |
|
|
float |
pinch, |
|
|
float |
bubble |
|
) |
|
|
- Parameters:
- float dist
The distance to the selection. The method for computing this
distance is up to the developer; for example in
Mesh Select, it's the distance to the nearest selected vertex,
while in Volume Select (with a box or sphere selection region) it's
the distance to the selection volume.
float falloff
The limit distance of the effect. If distance > falloff, the
function will always return 0.
float pinch
Use this to affect the tangency of the curve near distance=0.
Positive values produce a pointed tip, with a negative slope at 0,
while negative values produce a dimple, with positive slope.
float bubble
Use this to change the curvature of the function. A value of 1.0
produces a half-dome. As you reduce this value, the sides of the
dome slope more steeply. Negative values lower the base of the
curve below 0.
- Returns:
- Returns the strength of the Affect Region function at the given
distance. (In selection modifiers, this is the "soft selection"
amount, the amount it's considered selected. A vertex at a distance
with a return value of .25, for instance, will be affected 1/4 as
strongly in a deformation as a fully selected vertex.)
DllExport Point3 SoftSelectionColor |
( |
float |
selAmount |
) |
|
DllExport void MatrixFromNormal |
( |
Point3 & |
normal, |
|
|
Matrix3 & |
mat |
|
) |
|
|
- Parameters:
- Point3&
normal
The input normal is specified here.
Matrix3&
mat
The output matrix.
DllExport void AverageVertexNormals |
( |
Mesh
& |
mesh, |
|
|
Tab< Point3 > & |
vnormals |
|
) |
|
|
- Parameters:
-
Mesh & mesh
The mesh whose average vertex normals are computed.
Tab<Point3> & vnormals
The output vertex normals. . This will be set to size
mesh.numVerts.
DllExport Point3 AverageSelVertNormal |
( |
Mesh
& |
mesh |
) |
|
- Parameters:
-
Mesh& mesh
The mesh to check. The function uses mesh.vertSel to check
for selected verts.
DllExport Point3 AverageSelVertCenter |
( |
Mesh
& |
mesh |
) |
|
- Parameters:
-
Mesh& mesh
The mesh to check. The function uses mesh.vertSel to check
for selected verts.
DllExport void DeselectHiddenFaces |
( |
Mesh
& |
mesh |
) |
|
- Parameters:
-
Mesh& mesh
The mesh to check.
DllExport void DeselectHiddenEdges |
( |
Mesh
& |
mesh |
) |
|
- Parameters:
-
Mesh& mesh
The mesh to check.
DllExport void HiddenFacesToVerts |
( |
Mesh
& |
mesh, |
|
|
BitArray |
alsoHide |
|
) |
|
|
- Parameters:
-
Mesh &mesh
The mesh to check.
BitArray
&alsoHide
If specified, this is used to indicates other vertices that should
also be hidden.
DllExport void SelectionDistance |
( |
Mesh
& |
mesh, |
|
|
float * |
selDist, |
|
|
float |
falloffLimit =
-1.0f |
|
) |
|
|
- Parameters:
-
Mesh & mesh
The mesh to check.
float *selDist
This is assumed to be a float array of size mesh.numVerts.
It is set to -1 for all verts if there is no selection. Otherwise,
selected vertices have a value of 0, and nonselected vertices have
the distance to the nearest selected vertex.
DllExport void SelectionDistance |
( |
Mesh
& |
mesh, |
|
|
float * |
selDist, |
|
|
int |
iters, |
|
|
AdjEdgeList * |
ae = NULL |
|
) |
|
|
- Parameters:
-
Mesh & mesh
The mesh to check.
float *selDist
An array of floats of size mesh.numVerts.
int iters
If 0, Selection Distance is computed from each vertex to the
nearest selected vertex, regardless of topology. This is a VERY
EXPENSIVE ALGORITHM, which takes almost 4 times as long for twice
as many vertices. If iters is non-zero, it represents the number of
edges one should "travel" in trying to find the nearest selected
vertex -- this means that it only takes twice as long for twice as
many verts. (This is like the Edge Distance parameter in EMesh's Soft
Selection dialog.) If iters is 0, ae is irrelevant and may be left
as NULL. If iters is nonzero, an Adjacent Edge List is required, and will be computed
internally from the mesh if ae is NULL. (If you've got an AdjEdgeList for this mesh
handy, pass it in, otherwise don't worry about it.)
Note also that if iters is nonzero, the distance is computed along
the edges, not directly through space. If there is no selected
vertex within an iters-length path, a vertex is assigned a 0
selection value.
AdjEdgeList
*ae=NULL
The optional adjacent edge list.
DllExport void ClustDistances |
( |
Mesh
& |
mesh, |
|
|
DWORD |
numClusts, |
|
|
DWORD * |
vclust, |
|
|
Tab< float > ** |
clustDist |
|
) |
|
|
- Parameters:
-
Mesh &mesh
The mesh the clusters are based on.
DWORD numClusts
The number of clusters in this mesh.
DWORD *vclust
A pointer to an array of vertex cluster IDs. Typically this is a
pointer to the data in the table created by
EdgeClusterList::GetVertClusters or
FaceClusterList::GetVertClusters.
Tab<float>
**clustDist
This is an array of <numClusts> pointers to tables that will
be used to store distances from various clusters. Each table will
be set to the ize of mesh.numVerts and filled with distances to the
cluster that table represents.
DllExport void ClustDistances |
( |
Mesh
& |
mesh, |
|
|
DWORD |
numClusts, |
|
|
DWORD * |
vclust, |
|
|
Tab< float > ** |
clustDist, |
|
|
int |
iters, |
|
|
AdjEdgeList * |
ae = NULL |
|
) |
|
|
- Parameters:
-
Mesh & mesh
The mesh the clusters are based on.
DWORD numClusts
The number of clusters in this mesh.
DWORD *vclust
A pointer to an array of vertex cluster IDs. Typically this is a
pointer to the data in the table created by
EdgeClusterList::GetVertClusters or
FaceClusterList::GetVertClusters.
Tab<float>
**clustDist
This is an array of <numClusts> pointers to tables that will
be used to store distances from various clusters. Each table will
be set to the ize of mesh.numVerts and filled with distances to the
cluster that table represents.
int iters
The maximum number of edges to travel along looking for a vertex in
the given cluster.
AdjEdgeList
*ae=NULL
Edge length computations
require an adjacent edge list. If you don't pass one in this
parameter, it'll have to construct its own from the mesh.