#include <meshdelta.h>
Public Member Functions |
|
DllExport | MeshDelta () |
DllExport | MeshDelta (const Mesh &m) |
DllExport | ~MeshDelta () |
DllExport void | InitToMesh (const Mesh &m) |
DllExport void | ClearAllOps () |
DllExport void | SetMapNum (int n, bool keep=TRUE) |
int | GetMapNum () |
MapDelta & | Map (int mp) |
bool | getMapSupport (int mp) |
void | setMapSupport (int mp, bool val=true) |
bool | hasMapSupport () |
DllExport void | SetVDataNum (int size, bool keep=TRUE) |
int | GetVDataNum () |
DllExport DWORD | PartsChanged () |
DllExport void | Apply (Mesh &mesh) |
MeshDelta & | operator= (MeshDelta &td) |
MeshDelta & | operator*= (MeshDelta &td) |
DllExport void | Compose (MeshDelta &td) |
DllExport DWORD | NumVMove (DWORD inVNum) |
DllExport DWORD | NumVClone (DWORD inVNum) |
DllExport DWORD | NumVDelete (DWORD inVNum) |
DllExport DWORD | NumFDelete (DWORD inFNum) |
int | NumFCreate () |
DllExport void | SetInFNum (int nface) |
DllExport void | SetInVNum (int nv) |
int | outVNum () |
int | outVNum (int inVNum) |
int | outFNum () |
int | outFNum (int inFNum) |
DllExport void | FillInFaces (Mesh &m) |
DllExport void | AddVertexColors () |
DllExport void | AddMap (int mapID) |
DllExport void | AddVertexData (int vdChan, Mesh *m=NULL) |
DllExport void | UpdateLUTs (int extraV=0, int extraF=0) |
DllExport void | ClearLUTs () |
DllExport DWORD | VLut (DWORD i) |
DllExport DWORD | FLut (DWORD i) |
DllExport DWORD | PostVIndex (DWORD i) |
DllExport DWORD | PostFIndex (DWORD i) |
bool | IsVClone (DWORD i) |
DWORD | VCloneOf (DWORD i) |
bool | IsVCreate (DWORD i) |
bool | IsFCreate (DWORD i) |
DllExport DWORD | MoveID (DWORD i) |
DllExport DWORD | VCreate (Point3 *p, int num=1, BitArray *sel=NULL, BitArray *hide=NULL) |
DllExport DWORD | VClone (DWORD *v, int num=1) |
DllExport DWORD | VClone (DWORD *v, Point3 *off, int num=1) |
DllExport DWORD | VClone (VertMove *vm, int num=1) |
DWORD | VClone (DWORD v) |
DWORD | VClone (DWORD v, Point3 off) |
DllExport Point3 | OutVert (Mesh &m, DWORD v) |
DllExport void | VDelete (DWORD *v, int num=1) |
DllExport void | VDelete (BitArray &vdel) |
DllExport DWORD | FCreate (Face *f, int num=1) |
DllExport DWORD | FCreate (FaceCreate *f, int num=1) |
DllExport DWORD | FCreateQuad (DWORD *v, DWORD smG=0, MtlID matID=0, int orig=UNDEFINED) |
DllExport DWORD | FClone (Face &f, DWORD ff, DWORD remapFlags=0, DWORD *v=NULL) |
DllExport void | CreateDefaultMapFaces (int num=1) |
DllExport void | FRemap (FaceRemap *f, int num=1) |
DllExport void | FRemap (DWORD f, DWORD flags, DWORD *v) |
DllExport DWORD | RemapID (DWORD ff) |
DllExport DWORD | IsRemapped (DWORD ff, DWORD vid) |
DllExport Face | OutFace (Mesh &m, DWORD ff) |
DllExport void | FChange (FaceChange *f, int num=1) |
DllExport void | FChange (DWORD f, DWORD flags, DWORD dat) |
DllExport void | FSmooth (FaceSmooth *f, int num=1) |
DllExport void | FSmooth (DWORD f, DWORD mask, DWORD val) |
void | SetMatID (DWORD f, MtlID mt) |
void | SetSmGroup (DWORD f, DWORD smG) |
void | SetEdgeVis (DWORD f, DWORD ed, BOOL vis=TRUE) |
DllExport void | FDelete (DWORD *f, int num=1) |
DllExport void | FDelete (BitArray &fdel) |
DllExport void | Move (int i, const Point3 &p) |
DllExport void | Move (BitArray &sel, const Point3 &p) |
DllExport void | Move (VertMove *vm, int num) |
DllExport void | GetSavingPermutations (int &numCr, int &numCl, Tab< int > &vPermute, Tab< int > &vPReverse) |
DllExport void | PermuteClonedVertices (Tab< int > &vPermute) |
DllExport IOResult | Save (ISave *isave) |
DllExport IOResult | Load (ILoad *iload) |
DllExport void | MyDebugPrint (bool lut=FALSE, bool mp=FALSE) |
DllExport DWORD | ChangeFlags (Tab< DWORD > *mChannels=NULL) |
DllExport void | CopyMDChannels (MeshDelta &from, DWORD channels, Tab< DWORD > *mChannels=NULL) |
DllExport BOOL | CheckOrder () |
DllExport BOOL | CheckMapFaces () |
DllExport void | AutoSmooth (Mesh &m, BitArray sel, float angle, AdjFaceList *af=NULL, AdjEdgeList *ae=NULL) |
DllExport void | Bevel (Mesh &m, BitArray vset, float outline, Tab< Point3 > *odir, float height, Tab< Point3 > *hdir) |
DllExport DWORD | CreatePolygon (Mesh &m, int deg, int *v, DWORD smG=0, MtlID matID=0) |
DllExport void | DeleteVertSet (Mesh &m, BitArray sel) |
DllExport void | DeleteEdgeSet (Mesh &m, BitArray sel) |
DllExport void | DeleteFaceSet (Mesh &m, BitArray sel) |
DllExport void | DeleteSelected (Mesh &m) |
DllExport void | DeleteIsoVerts (Mesh &m) |
DllExport void | FlipNormal (Mesh &m, DWORD face) |
DllExport void | MakeSelFacesPlanar (Mesh &m, BitArray sel) |
DllExport void | MakeSelVertsPlanar (Mesh &m, BitArray sel) |
DllExport void | MoveVertsToPlane (Mesh &m, BitArray sel, Point3 &N, float offset) |
DllExport void | RestrictMatIDs (Mesh &m, int numMats) |
DllExport void | SelectFacesByFlags (Mesh &m, BOOL onoff, DWORD flagmask, DWORD flags) |
DllExport void | SetSingleEdgeVis (Mesh &m, DWORD ed, BOOL vis, AdjFaceList *adj=NULL) |
DllExport void | AttachMesh (Mesh &m, Mesh &attachment, Matrix3 &relativeTransform, int matOffset) |
DllExport void | BreakVerts (Mesh &m, BitArray vset) |
DllExport void | ChamferEdges (Mesh &m, BitArray eset, MeshChamferData &mcd, AdjEdgeList *ae=NULL) |
DllExport void | ChamferMove (Mesh &m, MeshChamferData &mcd, float amount, AdjEdgeList *ae=NULL) |
DllExport void | ChamferVertices (Mesh &m, BitArray vset, MeshChamferData &mcd, AdjEdgeList *ae=NULL) |
DllExport void | CloneFaces (Mesh &m, BitArray fset) |
DllExport void | CloneVerts (Mesh &m, BitArray vset) |
DllExport void | CollapseEdges (Mesh &m, BitArray ecol, AdjEdgeList *ae=NULL) |
DllExport DWORD | Cut (Mesh &m, DWORD ed1, float prop1, DWORD ed2, float prop2, Point3 &norm, bool fixNeighbors=TRUE, bool split=FALSE) |
DllExport void | Detach (Mesh &m, Mesh *out, BitArray fset, BOOL faces, BOOL del, BOOL elem) |
DllExport void | DivideEdge (Mesh &m, DWORD ed, float prop=.5f, AdjEdgeList *el=NULL, bool visDiag1=FALSE, bool fixNeighbors=TRUE, bool visDiag2=FALSE, bool split=FALSE) |
DllExport void | DivideEdges (Mesh &m, BitArray eset, AdjEdgeList *el=NULL) |
DllExport void | DivideFace (Mesh &m, DWORD f, float *bary=NULL) |
DllExport void | DivideFaces (Mesh &m, BitArray fset, MeshOpProgress *mop=NULL) |
DllExport void | EdgeTessellate (Mesh &m, BitArray fset, float tens, AdjEdgeList *ae=NULL, AdjFaceList *af=NULL, MeshOpProgress *mop=NULL) |
DllExport void | ExplodeFaces (Mesh &m, float thresh, bool useFaceSel=FALSE, AdjFaceList *af=NULL) |
DllExport void | ExtrudeEdges (Mesh &m, BitArray eset, Tab< Point3 > *edir=NULL) |
DllExport void | ExtrudeFaces (Mesh &m, BitArray fset, AdjEdgeList *el=NULL) |
DllExport void | ResetVertCorners (Mesh &m) |
DllExport void | ResetVertWeights (Mesh &m) |
void | SetFaceAlpha (Mesh &m, BitArray fset, float alpha, int mp=MAP_ALPHA) |
void | SetVertAlpha (Mesh &m, BitArray vset, float alpha, int mp=MAP_ALPHA) |
DllExport void | SetFaceColors (Mesh &m, BitArray fset, VertColor vc, int mp=0) |
DllExport void | SetVertColors (Mesh &m, BitArray vset, VertColor vc, int mp=0) |
DllExport void | SetVertCorners (Mesh &m, BitArray vset, float corner) |
DllExport void | SetVertWeights (Mesh &m, BitArray vset, float weight) |
DllExport DWORD | TurnEdge (Mesh &m, DWORD ed, AdjEdgeList *el=NULL) |
DllExport BOOL | WeldByThreshold (Mesh &m, BitArray vset, float thresh) |
DllExport void | WeldVertSet (Mesh &m, BitArray vset, Point3 *weldPoint=NULL) |
DllExport void | PropagateFacing (Mesh &m, BitArray &fset, int face, AdjFaceList &af, BitArray &done, BOOL bias=1) |
DllExport void | UnifyNormals (Mesh &m, BitArray fset, AdjFaceList *af=NULL) |
DllExport void | Slice (Mesh &m, Point3 N, float off, bool sep=FALSE, bool remove=FALSE, BitArray *fslice=NULL, AdjEdgeList *ae=NULL) |
Public Attributes |
|
DWORD | vnum |
DWORD | fnum |
Tab< VertMove > | vMove |
Tab< VertMove > | vClone |
BitArray | vDelete |
Tab< FaceCreate > | fCreate |
Tab< FaceRemap > | fRemap |
Tab< FaceChange > | fChange |
Tab< FaceSmooth > | fSmooth |
BitArray | fDelete |
BitArray | vsel |
BitArray | esel |
BitArray | fsel |
BitArray | vhide |
MapDelta * | map |
BitArray | mapSupport |
VDataDelta * | vd |
BitArray | vdSupport |
DllExport MeshDelta | ( | ) |
DllExport ~MeshDelta | ( | ) |
DllExport void InitToMesh | ( | const Mesh & | m | ) |
DllExport void ClearAllOps | ( | ) |
DllExport void SetMapNum | ( | int | n, |
bool | keep = TRUE |
||
) |
int GetMapNum | ( | ) | [inline] |
{ return mapSupport.GetSize(); }
MapDelta& Map | ( | int | mp | ) | [inline] |
{ return (mp<0) ? hmap[-1-mp] : map[mp]; }
bool getMapSupport | ( | int | mp | ) | [inline] |
{ return ((mp<0) ? hmapSupport[-1-mp] : mapSupport[mp]) ? true : false; }
void setMapSupport | ( | int | mp, |
bool | val = true |
||
) | [inline] |
{ if (mp<0) hmapSupport.Set(-1-mp, val); else mapSupport.Set(mp, val); }
bool hasMapSupport | ( | ) | [inline] |
{ return !(mapSupport.IsEmpty() && hmapSupport.IsEmpty()); }
DllExport void SetVDataNum | ( | int | size, |
bool | keep = TRUE |
||
) |
int GetVDataNum | ( | ) | [inline] |
DllExport DWORD PartsChanged | ( | ) |
DllExport void Apply | ( | Mesh & | mesh | ) |
{ CopyMDChannels (td, MDELTA_ALL); return *this; }
{ Compose(td); return *this; }
DllExport void Compose | ( | MeshDelta & | td | ) |
DllExport DWORD NumVMove | ( | DWORD | inVNum | ) |
DllExport DWORD NumVClone | ( | DWORD | inVNum | ) |
DllExport DWORD NumVDelete | ( | DWORD | inVNum | ) |
DllExport DWORD NumFDelete | ( | DWORD | inFNum | ) |
int NumFCreate | ( | ) | [inline] |
DllExport void SetInFNum | ( | int | nface | ) |
DllExport void SetInVNum | ( | int | nv | ) |
int outVNum | ( | ) | [inline] |
int outVNum | ( | int | inVNum | ) | [inline] |
{ return inVNum + NumVClone(inVNum) - NumVDelete(inVNum); }
int outFNum | ( | ) | [inline] |
int outFNum | ( | int | inFNum | ) | [inline] |
{ return inFNum + fCreate.Count() - NumFDelete(inFNum); }
DllExport void FillInFaces | ( | Mesh & | m | ) |
DllExport void AddVertexColors | ( | ) |
DllExport void AddMap | ( | int | mapID | ) |
DllExport void AddVertexData | ( | int | vdChan, |
Mesh * | m = NULL |
||
) |
DllExport void UpdateLUTs | ( | int | extraV = 0 , |
int | extraF = 0 |
||
) |
DllExport void ClearLUTs | ( | ) |
DllExport DWORD VLut | ( | DWORD | i | ) |
DllExport DWORD FLut | ( | DWORD | i | ) |
DllExport DWORD PostVIndex | ( | DWORD | i | ) |
DllExport DWORD PostFIndex | ( | DWORD | i | ) |
bool IsVClone | ( | DWORD | i | ) | [inline] |
DWORD VCloneOf | ( | DWORD | i | ) | [inline] |
bool IsVCreate | ( | DWORD | i | ) | [inline] |
{ return FALSE; }
bool IsFCreate | ( | DWORD | i | ) | [inline] |
DllExport DWORD MoveID | ( | DWORD | i | ) |
DllExport DWORD VClone | ( | DWORD * | v, |
int | num = 1 |
||
) |
DllExport DWORD VClone | ( | DWORD * | v, |
Point3 * | off, | ||
int | num = 1 |
||
) |
DllExport DWORD VClone | ( | VertMove * | vm, |
int | num = 1 |
||
) |
DWORD VClone | ( | DWORD | v | ) | [inline] |
{ return VClone (&v, 1); }
DWORD VClone | ( | DWORD | v, |
Point3 | off | ||
) | [inline] |
DllExport void VDelete | ( | DWORD * | v, |
int | num = 1 |
||
) |
DllExport void VDelete | ( | BitArray & | vdel | ) |
DllExport DWORD FCreate | ( | Face * | f, |
int | num = 1 |
||
) |
DllExport DWORD FCreate | ( | FaceCreate * | f, |
int | num = 1 |
||
) |
DllExport DWORD FCreateQuad | ( | DWORD * | v, |
DWORD | smG = 0 , |
||
MtlID | matID = 0 , |
||
int | orig =
UNDEFINED |
||
) |
DllExport DWORD FClone | ( | Face & | f, |
DWORD | ff, | ||
DWORD | remapFlags = 0 , |
||
DWORD * | v = NULL |
||
) |
DllExport void CreateDefaultMapFaces | ( | int | num = 1 |
) |
DllExport void FRemap | ( | FaceRemap * | f, |
int | num = 1 |
||
) |
DllExport void FRemap | ( | DWORD | f, |
DWORD | flags, | ||
DWORD * | v | ||
) |
DllExport DWORD RemapID | ( | DWORD | ff | ) |
DllExport DWORD IsRemapped | ( | DWORD | ff, |
DWORD | vid | ||
) |
DllExport void FChange | ( | FaceChange * | f, |
int | num = 1 |
||
) |
DllExport void FChange | ( | DWORD | f, |
DWORD | flags, | ||
DWORD | dat | ||
) |
DllExport void FSmooth | ( | FaceSmooth * | f, |
int | num = 1 |
||
) |
DllExport void FSmooth | ( | DWORD | f, |
DWORD | mask, | ||
DWORD | val | ||
) |
void SetMatID | ( | DWORD | f, |
MtlID | mt | ||
) | [inline] |
{ FChange (f, ATTRIB_MATID, mt<<ATTRIB_MATID_SHIFT); }
void SetSmGroup | ( | DWORD | f, |
DWORD | smG | ||
) | [inline] |
{ FSmooth (f, ~DWORD(0), smG); }
void SetEdgeVis | ( | DWORD | f, |
DWORD | ed, | ||
BOOL | vis = TRUE |
||
) | [inline] |
{ FChange (f, (1<<ed), vis?(1<<ed):0); }
DllExport void FDelete | ( | DWORD * | f, |
int | num = 1 |
||
) |
DllExport void FDelete | ( | BitArray & | fdel | ) |
DllExport void Move | ( | int | i, |
const Point3 & | p | ||
) |
DllExport void Move | ( | VertMove * | vm, |
int | num | ||
) |
DllExport void PermuteClonedVertices | ( | Tab< int > & | vPermute | ) |
DllExport void MyDebugPrint | ( | bool | lut = FALSE , |
bool | mp = FALSE |
||
) |
DllExport DWORD ChangeFlags | ( | Tab< DWORD > * | mChannels = NULL |
) |
DllExport BOOL CheckOrder | ( | ) |
DllExport BOOL CheckMapFaces | ( | ) |
DllExport void AutoSmooth | ( | Mesh & | m, |
BitArray | sel, | ||
float | angle, | ||
AdjFaceList * | af = NULL , |
||
AdjEdgeList * | ae = NULL |
||
) |
DllExport void Bevel | ( | Mesh & | m, |
BitArray | vset, | ||
float | outline, | ||
Tab< Point3 > * | odir, | ||
float | height, | ||
Tab< Point3 > * | hdir | ||
) |
DllExport DWORD CreatePolygon | ( | Mesh & | m, |
int | deg, | ||
int * | v, | ||
DWORD | smG = 0 , |
||
MtlID | matID = 0 |
||
) |
DllExport void DeleteSelected | ( | Mesh & | m | ) |
DllExport void DeleteIsoVerts | ( | Mesh & | m | ) |
DllExport void FlipNormal | ( | Mesh & | m, |
DWORD | face | ||
) |
DllExport void RestrictMatIDs | ( | Mesh & | m, |
int | numMats | ||
) |
DllExport void SelectFacesByFlags | ( | Mesh & | m, |
BOOL | onoff, | ||
DWORD | flagmask, | ||
DWORD | flags | ||
) |
DllExport void SetSingleEdgeVis | ( | Mesh & | m, |
DWORD | ed, | ||
BOOL | vis, | ||
AdjFaceList * | adj = NULL |
||
) |
DllExport void AttachMesh | ( | Mesh & | m, |
Mesh & | attachment, | ||
Matrix3 & | relativeTransform, | ||
int | matOffset | ||
) |
DllExport void ChamferEdges | ( | Mesh & | m, |
BitArray | eset, | ||
MeshChamferData & | mcd, | ||
AdjEdgeList * | ae = NULL |
||
) |
DllExport void ChamferMove | ( | Mesh & | m, |
MeshChamferData & | mcd, | ||
float | amount, | ||
AdjEdgeList * | ae = NULL |
||
) |
DllExport void ChamferVertices | ( | Mesh & | m, |
BitArray | vset, | ||
MeshChamferData & | mcd, | ||
AdjEdgeList * | ae = NULL |
||
) |
DllExport void CollapseEdges | ( | Mesh & | m, |
BitArray | ecol, | ||
AdjEdgeList * | ae = NULL |
||
) |
DllExport DWORD Cut | ( | Mesh & | m, |
DWORD | ed1, | ||
float | prop1, | ||
DWORD | ed2, | ||
float | prop2, | ||
Point3 & | norm, | ||
bool | fixNeighbors =
TRUE , |
||
bool | split =
FALSE |
||
) |
DllExport void DivideEdge | ( | Mesh & | m, |
DWORD | ed, | ||
float | prop = .5f , |
||
AdjEdgeList * | el = NULL , |
||
bool | visDiag1 = FALSE , |
||
bool | fixNeighbors =
TRUE , |
||
bool | visDiag2 = FALSE , |
||
bool | split =
FALSE |
||
) |
DllExport void DivideEdges | ( | Mesh & | m, |
BitArray | eset, | ||
AdjEdgeList * | el = NULL |
||
) |
DllExport void DivideFace | ( | Mesh & | m, |
DWORD | f, | ||
float * | bary = NULL |
||
) |
DllExport void DivideFaces | ( | Mesh & | m, |
BitArray | fset, | ||
MeshOpProgress * | mop = NULL |
||
) |
DllExport void EdgeTessellate | ( | Mesh & | m, |
BitArray | fset, | ||
float | tens, | ||
AdjEdgeList * | ae = NULL , |
||
AdjFaceList * | af = NULL , |
||
MeshOpProgress * | mop = NULL |
||
) |
DllExport void ExplodeFaces | ( | Mesh & | m, |
float | thresh, | ||
bool | useFaceSel =
FALSE , |
||
AdjFaceList * | af = NULL |
||
) |
DllExport void ExtrudeFaces | ( | Mesh & | m, |
BitArray | fset, | ||
AdjEdgeList * | el = NULL |
||
) |
DllExport void ResetVertCorners | ( | Mesh & | m | ) |
DllExport void ResetVertWeights | ( | Mesh & | m | ) |
{ SetFaceColors (m, fset, UVVert(alpha,alpha,alpha), mp); }
{ SetVertColors (m, vset, UVVert(alpha,alpha,alpha),mp); }
DllExport DWORD TurnEdge | ( | Mesh & | m, |
DWORD | ed, | ||
AdjEdgeList * | el = NULL |
||
) |
DllExport void PropagateFacing | ( | Mesh & | m, |
BitArray & | fset, | ||
int | face, | ||
AdjFaceList & | af, | ||
BitArray & | done, | ||
BOOL | bias = 1 |
||
) |
DllExport void UnifyNormals | ( | Mesh & | m, |
BitArray | fset, | ||
AdjFaceList * | af = NULL |
||
) |
DllExport void Slice | ( | Mesh & | m, |
Point3 | N, | ||
float | off, | ||
bool | sep = FALSE , |
||
bool | remove = FALSE , |
||
BitArray * | fslice = NULL , |
||
AdjEdgeList * | ae = NULL |
||
) |