In 3ds Max 3.0 and later the user may work with more than 2 mapping channels.
When the mapping channel is set to a value greater than 1 (by using a UVWMap Modifier for example) then an instance of this class is allocated for each channel up to the value specified. It maintains the mapping information for a single channel. An array of instances of this class is carried by the Mesh class in the public data member: MeshMap *maps; All methods of this class are implemented by the system.
#include <mesh.h>
Public Member Functions |
|
MeshMap () | |
Constructor. |
|
DllExport | ~MeshMap () |
Destructor. |
|
int | getNumVerts () |
Returns the number of UVVerts. |
|
DllExport void | setNumVerts (int vn, BOOL keep=FALSE) |
Sets the number of UVVerts allocated to the
specified value. |
|
int | getNumFaces () |
Returns the number of TVFaces. |
|
DllExport void | setNumFaces (int fn, BOOL keep=FALSE, int oldCt=0) |
Set the number of TVFaces allocated to the
specified value. |
|
DllExport void | Clear () |
Clears (deletes) the tv and tf arrays and
sets the counts to zero. |
|
DllExport BitArray | GetIsoVerts () |
This method returns a BitArray with size vnum, where isolated
(unused) vertices are selected. |
|
DllExport void | DeleteVertSet (BitArray set, BitArray *delFace=NULL) |
This method is used to delete vertices from
a mesh map. |
|
DllExport void | DeleteFaceSet (BitArray set, BitArray *isoVert=NULL) |
This method is used to delete faces from a
mesh map. |
|
void | SetFlag (DWORD fl) |
Sets the specified flag(s). |
|
void | ClearFlag (DWORD fl) |
Clears the specified flag(s). |
|
BOOL | GetFlag (DWORD fl) |
Returns TRUE if the specified flag(s) are
set; otherwise FALSE. |
|
BOOL | IsUsed () const |
Returns TRUE if this mapping channel is
being used; otherwise FALSE. |
|
DllExport void | SwapContents (MeshMap &from) |
Exchanges the data between this
MeshMap object and the specified one. |
|
DllExport MeshMap & | operator= (MeshMap &from) |
Assignment operator. |
|
Public Attributes |
|
DWORD | flags |
One or more of the flags in . |
|
UVVert * | tv |
Array of texture vertices. |
|
TVFace * | tf |
The texture vertex faces. |
|
int | vnum |
The number of elements in the UVVert array.
|
|
int | fnum |
The number of elements in the TVFace
array. |
MeshMap | ( | ) | [inline] |
DllExport ~MeshMap | ( | ) |
Destructor.
If the tv and tf arrays are allocated they are deleted.
int getNumVerts | ( | ) | [inline] |
DllExport void setNumVerts | ( | int | vn, |
BOOL | keep = FALSE |
||
) |
Sets the number of UVVerts allocated to the specified value.
vn | The new number of UVVerts to allocate. |
keep | If TRUE, any previously allocated UVVerts are maintained (up to the maximum set by vn). If FALSE they are discarded. Defaults to False. |
int getNumFaces | ( | ) | [inline] |
DllExport void setNumFaces | ( | int | fn, |
BOOL | keep = FALSE , |
||
int | oldCt = 0 |
||
) |
Set the number of TVFaces allocated to the specified value.
fn | The new number of TVFaces to allocate. |
keep | If TRUE any previously allocated TVFaces are maintained (up to the maximum set by fn). If FALSE they are discarded. Defaults to FALSE. |
DllExport void Clear | ( | ) |
Clears (deletes) the tv and tf arrays and sets the counts to zero.
DllExport BitArray GetIsoVerts | ( | ) |
This method returns a BitArray with size vnum, where isolated (unused) vertices are selected.
This method is used to delete vertices from a mesh map.
set | The array of bits where mapping vertices you want to delete are set. |
delFace | This is an optional parameter. If non-NULL, it's filled with a record of which faces, if any, were using the specified map verts and should therefore be deleted or considered invalid. (Note: in normal usage, it's preferable to remove any compromised faces _before_ deleting vertices, so this parameter would rarely be used). Defaults to NULL |
This method is used to delete faces from a mesh map.
NOTE: The number and arrangement of faces in a MeshMap should always agree with the "parent" mesh. It's safest in most cases to just let this be handled by Mesh::DeleteFaceSet().
set | This is a list of mapping faces to delete. |
isoVert | If non-NULL, this BitArray is filled with a list of map vertices that were used by the deleted faces but not by any remaining faces. (This is a list of "newly isolated" map vertices). Defaults to NULL. |
void SetFlag | ( | DWORD | fl | ) | [inline] |
Sets the specified flag(s).
fl | The flags to set. See the public data member flags above. |
{ flags |= fl; }
void ClearFlag | ( | DWORD | fl | ) | [inline] |
Clears the specified flag(s).
fl | The flags to clear. See the public data member flags above. |
{ flags &= ~fl; }
BOOL GetFlag | ( | DWORD | fl | ) | [inline] |
Returns TRUE if the specified flag(s) are set; otherwise FALSE.
fl | The flags to check. See the public data member flags above. |
{ return (flags & fl) ? TRUE : FALSE; }
BOOL IsUsed | ( | ) | const [inline] |
Returns TRUE if this mapping channel is being used; otherwise FALSE.
{ return (flags & MESHMAP_USED) ? TRUE : FALSE; }
DllExport void SwapContents | ( | MeshMap & | from | ) |
Assignment operator.
from | The MeshMap to assign. |
DWORD flags |
One or more of the flags in .
Array of texture vertices.
This stores the UVW coordinates for the mapping channel. Note: typedef Point3 UVVert;
int vnum |
The number of elements in the UVVert array.