Changeset 980 for GTP/trunk/Lib/Geom/shared/GTGeometry/include
- Timestamp:
- 05/24/06 10:47:49 (19 years ago)
- Location:
- GTP/trunk/Lib/Geom/shared/GTGeometry/include
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoBase.h
r774 r980 45 45 }; 46 46 47 struct MeshBounds 48 { 49 float maxX; 50 float maxY; 51 float maxZ; 52 float minX; 53 float minY; 54 float minZ; 55 float radius; 56 float scaleFactor; 57 }; 58 47 59 // 2006-02-14 48 60 // Gustavo Puche. -
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsLibrary.h
r829 r980 1 /* 1 /*========================================================================== 2 2 * (C) 2005 Universidad Jaime I de Castellón 3 * 3 *========================================================================== 4 4 * PROYECT: GAME TOOLS 5 * 6 /* *CONTENT:7 8 9 10 /*===========================================================================*/5 *==========================================================================*/ 6 /* CONTENT: 7 * 8 * 9 * @file GeoLodStripsLibrary.h 10 *==========================================================================*/ 11 11 12 12 #ifndef _GEOLODSTRIPSLIBRARY -
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoMesh.h
r891 r980 12 12 #include "GeoSubMesh.h" 13 13 14 namespace Geometry {15 14 namespace Geometry 15 { 16 16 /// Mesh class interface 17 17 class Mesh : public Serializable … … 43 43 44 44 45 VertexBuffer *mVertexBuffer; 46 SubMesh *mSubMesh; 47 size_t mSubMeshCount; 45 VertexBuffer *mVertexBuffer; ///< Shared VertexBuffer 46 SubMesh *mSubMesh; ///< Array of subMesehs 47 size_t mSubMeshCount; ///< Total count of subMeshes 48 48 49 49 //OSCAR … … 51 51 bool hasSkeleton; 52 52 std::vector<VertexBoneAssignment> mBones; 53 54 // Bounding box. 55 MeshBounds mMeshBounds; ///< Mesh bounds 53 56 }; 54 57 … … 56 59 57 60 #endif 61 -
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoMeshSimplifier.h
r891 r980 2 2 #define __GEO_MESH_SIMPLIFIER__ 3 3 4 #include "GeoMesh.h" 5 #include "GeoMeshSimpSequence.h" 4 #include <math.h> 5 #include "GeoMesh.h" 6 #include "GeoMeshSimpSequence.h" 7 #include "vmi_simplifier.h" 8 6 9 //#include "SimplificationMethod.h" 7 10 … … 38 41 39 42 /// Starts the simplification process. Receives as a parameter the LOD factor in a range of [0,1]. This is a pure virtual method and must be overloaded in a derived class that implements a simplification algorithm. 40 virtual void Simplify 43 virtual void Simplify(Geometry::Real)=0; 41 44 42 45 /// Starts the simplification process. Receives as a parameter the number of vertices of the resulting mesh. This is a pure virtual method and must be overloaded in a derived class that implements a simplification algorithm. 43 virtual void Simplify 46 virtual void Simplify(Geometry::uint32)=0; 44 47 45 48 /// Returns the simplified mesh. 46 Mesh *GetMesh 49 Mesh *GetMesh(); 47 50 48 51 /// Returns the simplification sequence for general meshes. … … 55 58 56 59 //private: // fer protected 57 Mesh *meshsalida;58 MeshSimplificationSequence 59 const Mesh *objmesh;60 Mesh *mGeoMesh; 61 MeshSimplificationSequence *msimpsequence; 62 const Mesh *objmesh; 60 63 61 64 Geometry::Index indexMeshLeaves; … … 70 73 { 71 74 private: 75 76 // Auxiliar vertex buffer. 77 Geometry::VertexBuffer *mVB; 78 79 // Loads a vmi mesh with a given geometry mesh. 80 VMI::Mesh * initMeshStructure(Geometry::Mesh *geoMesh); 72 81 82 // Loads a geometry mesh with a given vmi mesh. 83 void loadMesh(); 84 85 // Find vertex in auxiliar vertex buffer. 86 void findVertex(size_t submesh, size_t index); 87 73 88 public: 89 74 90 /// Class constructor. Will call Simplifier class constructor. 75 ViewPointDrivenSimplifier (const Geometry::Mesh *,76 Geometry::TIPOFUNC upb=0);91 ViewPointDrivenSimplifier( const Geometry::Mesh *geoMesh, 92 Geometry::TIPOFUNC upb=0); 77 93 78 94 /// Class destructor. 79 virtual ~ViewPointDrivenSimplifier(void);95 ~ViewPointDrivenSimplifier(void); 80 96 81 97 /// Copy constructor … … 86 102 87 103 /// Starts the simplification process. Receives as a parameter the LOD factor in a range of [0,1]. Implements the Simplifier::Simplify method to perform an image based simplification. 88 void Simplify 104 void Simplify(Geometry::Real); 89 105 90 106 /// Starts the simplification process. Receives as a parameter the number of vertices of the resulting mesh. Implements the Simplifier::Simplify method to perform an image based simplification. 91 void Simplify (Geometry::uint32); 107 void Simplify(Geometry::uint32); 108 109 // Returns the simplified mesh. 110 //Mesh *GetMesh(); 111 92 112 93 113 }; … … 100 120 public: 101 121 /// Class constructor. Will call Simplifier class constructor. 102 GeometryBasedSimplifier ( const Geometry::Mesh *,122 GeometryBasedSimplifier( const Geometry::Mesh *geoMesh, 103 123 Geometry::TIPOFUNC upb=0); 104 124 105 125 /// Class destructor. 106 virtual ~GeometryBasedSimplifier(void);126 ~GeometryBasedSimplifier(void); 107 127 108 128 /// Copy constructor … … 113 133 114 134 /// Starts the simplification process. Receives as a parameter the LOD factor in a range of [0,1]. Implements the Simplifier::Simplify method to perform an image based simplification. 115 void Simplify 135 void Simplify(Geometry::Real); 116 136 117 137 /// Starts the simplification process. Receives as a parameter the number of vertices of the resulting mesh. Implements the Simplifier::Simplify method to perform an image based simplification. 118 void Simplify 138 void Simplify(Geometry::uint32); 119 139 }; 120 140 } // end of Geometry namespace; 121 141 122 142 #endif 143 -
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoMeshStripifier.h
r841 r980 1 /* 1 /*========================================================================== 2 2 * (C) 2005 Universidad Jaime I de Castellón 3 * 3 *========================================================================== 4 4 * PROYECT: GAME TOOLS 5 * 6 /* *CONTENT: Make triangle strips meshes from triangle list meshes.7 8 9 10 /*===========================================================================*/5 *==========================================================================*/ 6 /* CONTENT: Make triangle strips meshes from triangle list meshes. 7 * 8 * 9 * @file GeoMeshStripifier.h 10 *==========================================================================*/ 11 11 12 12 #ifndef __GEO_STRIPIFIER__ 13 13 #define __GEO_STRIPIFIER__ 14 14 15 #include <GeoMesh.h>15 #include "GeoMesh.h" 16 16 17 17 namespace Geometry 18 18 { 19 20 #define TRIANGLE 3 21 #define MAGNITUDE 1000000 22 #define MAX_TIE 60 23 24 #define FALSE 0 25 #define TRUE 1 26 #define LISTHEAD 0 27 #define LISTTAIL 1 28 29 typedef struct 30 { 31 void *Next; 32 void *Previous; 33 } 34 myNode, * PNODE; 35 36 typedef int BOOL; 37 typedef void * PVOID; 38 39 typedef struct List 40 { 41 /* link to the next Listinfo Structure */ 42 myNode ListNode; 43 44 /* user definable data */ 45 } 46 ListInfo, *PLISTINFO; 47 48 typedef struct LHead 49 { 50 PLISTINFO LHeaders[2]; 51 int NumList; 52 } 53 ListHead, *PLISTHEAD; 54 55 #define PEEKFROMHEAD( lh, ind ) ( PeekList( (lh), LISTHEAD, (ind) ) ) 56 #define PEEKFROMTAIL( lh, ind ) ( PeekList( (lh), LISTTAIL, (ind) ) ) 57 #define EMPTYLIST( lh ) ( ( (lh)->LHeaders[LISTHEAD] == NULL ) ) 58 #define NumOnList(lh) ( ((lh)->NumList) ) 59 #define GetNextNode(pli) ( ((pli)->ListNode.Next) ) 60 #define GetPrevNode(pli) ( ((pli)->ListNode.Previous) ) 61 62 //----- 63 64 /** polverts.h 65 */ 66 typedef struct adjacencies 67 { 68 myNode ListNode; 69 int face_id; 70 }ADJACENCIES,*P_ADJACENCIES; 71 72 typedef struct FVerts 73 { 74 myNode ListNode; 75 int *pPolygon; 76 int nPolSize; 77 int nId; 78 } F_VERTS, *PF_VERTS; 79 80 /*Every time we need to use this, cast it ( ListInfo*)*/ 81 typedef struct FEdges 82 { 83 myNode ListNode; 84 int edge[3]; 85 }F_EDGES,*PF_EDGES; 86 87 typedef struct FFaces 88 { 89 myNode ListNode; 90 int *pPolygon; 91 int *pNorms; 92 int seen; 93 int seen2; 94 int seen3; 95 int nPolSize; 96 int nOrgSize; 97 F_EDGES **VertandId; 98 int *marked; 99 int *walked; 100 }F_FACES,*PF_FACES; 101 102 typedef struct FVertices 103 { 104 myNode ListNode; 105 PF_FACES face; 106 }F_VERTICES, *PF_VERTICES; 107 108 typedef struct Strips 109 { 110 myNode ListNode; 111 int face_id; 112 }Strips,*P_STRIPS; 113 114 115 struct vert_added 116 { 117 int num; 118 int *normal; 119 }; 120 121 typedef struct face_adjacencies 122 { 123 P_ADJACENCIES pfNode; 124 int bucket; 125 ListHead *head; 126 } 127 FACE_ADJACENCIES, *P_FACE_ADJACENCIES; 128 129 /** global.h 130 */ 131 typedef std::vector<int> mi_vector_tipo; 132 //std::vector<mi_vector_tipo> mi_vector; 133 enum swap_type {ON,OFF}; 134 135 #define VRDATA double 136 #define MAX1 60 137 138 #define GEO_PI 3.1415926573 139 #define ATOI(C) (C -'0') 140 #define EVEN(x) (((x) & 1) == 0) 141 #define MAX_BAND 10000 142 143 struct vert_struct 144 { 145 VRDATA x, y, z; /* point coordinates */ 146 }; 19 147 20 148 /// Stripifier interface class. … … 66 194 // Index of the submesh leaves. 67 195 size_t mSubMeshLeaves; 68 69 196 }; 70 197 71 198 class CustomStripifier : public MeshStripifier 72 199 { 200 private: 201 202 /* Globals */ 203 int mError; // 0 OK. 204 // 1 Error: The mesh is not Manifold. 205 int num_faces; 206 ListHead **PolFaces; 207 ListHead **PolEdges; 208 ListHead *array[60]; 209 P_FACE_ADJACENCIES face_array; /* Pointers from face_id to face */ 210 ListHead **Vertices; /* Pointers from vertex_id to face */ 211 ListHead *strips[1]; 212 int orient; 213 int num_tiras; 214 int ids[MAX1]; 215 int norms[MAX1]; 216 int *vert_norms; 217 int *vert_texture; 218 int out1;//= -1; // static. 219 int out2;//= -1; // static. 220 int ties_array[60]; // static. 221 int last;//= 0; // static. 222 int out1Ex;// = -1; // static. 223 int out2Ex;// = -1; // static. 224 int *vn; 225 int *vt; 226 int norm; // static. 227 int text; // static. 228 BOOL resetting;// = FALSE; // static. 229 int added_quad;// = 0; // static. 230 BOOL reversed;// = FALSE; // static. 231 int patch;// = 0; // static. 232 233 /** global.h 234 */ 235 std::vector<mi_vector_tipo> mi_vector; 236 237 /** auxiliar.h 238 */ 239 Geometry::Mesh *MeshGlobal; 240 // Structures for the object. 241 vert_struct *vertices; 242 vert_struct *nvertices; 243 vert_struct *pvertices; 244 vert_struct *pnvertices; 245 246 /* General utility routines */ 247 /* %%s QueRoutines */ 248 BOOL InitList ( PLISTHEAD ); 249 250 /***************************************************************** 251 InitList : Initialize a new list structure for use with the List 252 routines 253 254 INPUTS : LHead : a pointer to a ListHead structure. 255 OUTPUT : a boolean value TRUE if no errors occured FALSE 256 otherwise 257 ******************************************************************/ 258 259 260 PLISTINFO PeekList( PLISTHEAD, int, int ); 261 262 /***************************************************************** 263 PeekList : This funciton peeks down a list for the N'th element 264 from the HEAD or TAIL of the list 265 266 INPUTS : LHead : a pointer to a List head structure. 267 from : can either search from the HEAD or TAIL 268 of the list 269 where : how many nodes from the begining should the 270 List routines look. 271 OUTPUT : a pointer to a ListInfo structure identified by 272 from/where or NULL if an error occurred. 273 ******************************************************************/ 274 275 276 PLISTINFO RemoveList( PLISTHEAD LHead, PLISTINFO LInfo ); 277 278 279 /***************************************************************** 280 RemoveList: Remove a ListInfo structure from a List. 281 282 INPUTS : LHead : a pointer to a ListHead structure. 283 LInfo : a pointer to the ListInfo structure to remove 284 from the list. 285 OUTPUT : a pointer to the ListInfo structure that was removed or 286 NULL if an error occurred. 287 ******************************************************************/ 288 289 BOOL InsertNode( PLISTHEAD LHead, int nPos, PLISTINFO LInfo ); 290 291 /***************************************************************** 292 InsertNode: add a node to a list after a given node 293 294 INPUTS : LHead : a pointer to a ListHead structure. 295 nPos : the position to insert the node into 296 LInfo : a pointer to the new node to add to the list. 297 OUTPUT: a boolean value TRUE if all goes well false otherwise 298 *****************************************************************/ 299 300 BOOL AddHead ( PLISTHEAD, PLISTINFO ); 301 302 /***************************************************************** 303 AddHead : add a ListInfo structure to the HEAD of a list. 304 305 INPUTS : LHead : a pointer to a ListHead structure of the list 306 to add to. 307 LInfo : a pointer to the ListInfo structure to add to 308 the list. 309 OUTPUT : A boolean value TRUE if no errors occurred FALSE 310 otherwise. 311 ******************************************************************/ 312 313 314 BOOL AddTail ( PLISTHEAD, PLISTINFO ); 315 316 /***************************************************************** 317 AddTail : Add a ListInfo structure to the TAIL of a list. 318 319 INPUTS : LHead : a pointer to a ListHead structure of the List 320 to add to. 321 LInfo : a pointer to the ListInfo structure to add to 322 the List. 323 OUTPUT : a boolean value TRUE if no errors occurred FALSE 324 otherwise. 325 ******************************************************************/ 326 327 328 PLISTINFO RemTail ( PLISTHEAD ); 329 330 /***************************************************************** 331 RemTail : Remove a ListInfo structure from the TAIL of a List. 332 333 INPUTS : LHead : a pointer to a ListHead structure of the List 334 to remove from. 335 OUTPUT : a pointer to the ListInfo structure that was removed 336 or NULL if an error occurred. 337 ******************************************************************/ 338 339 340 PLISTINFO RemHead ( PLISTHEAD ); 341 342 /***************************************************************** 343 RemHead : Remove a ListInfo structure from the Head of a List. 344 345 INPUTS : LHead : a pointer to a ListHead structure of the List 346 to remove from. 347 OUTPUT : a pointer to the ListInfo structure that was removed or 348 NULL if an error occurred. 349 ******************************************************************/ 350 351 PLISTINFO SearchList( 352 PLISTHEAD lpListHead, 353 PVOID lpSKey, 354 int ( * CompareCallBack) ( PVOID, PVOID ) ); 355 356 /***************************************************************** 357 SearchList: 358 Try to find a specific node in the queue whose key matches with 359 searching key. Return the pointer to that node if found, return NULL 360 otherwise 361 362 Input: 363 lpHashTbl => a far pointer to the hash table 364 lpKey => a far poniter to searching key 365 CompareCallBack => comparision function 366 367 Output: a far pointer to the node to be found 368 369 ******************************************************************/ 370 371 /** init.h 372 */ 373 BOOL InitVertexTable(int nSize); 374 BOOL InitFaceTable(int nSize); 375 BOOL InitEdgeTable(int nSize); 376 void BuildFaceTable(int nSize); 377 void BuildVertexTable(int nSize); 378 void BuildEdgeTable(int nSize); 379 void init_vert_norms(int num_vert); 380 void init_vert_texture(int num_vert); 381 void InitStripTable(); 382 void Init_Table_SGI(int numfaces); 383 void Start_Vertex_Struct(int numverts); 384 void Start_Face_Struct(int numfaces); 385 void Start_Edge_Struct(int numverts); 386 387 /** util.h 388 */ 389 void switch_lower(int *x, int *y); 390 BOOL member(int x , int id1, int id2, int id3); 391 BOOL Exist(int face_id, int id1, int id2); 392 int Different( int id1,int id2,int id3,int id4,int id5, 393 int id6, int *x, int *y); 394 int Return_Other(int *index,int e1,int e2); 395 int Get_Other_Vertex(int id1,int id2,int id3,int *index); 396 PLISTINFO Done(int face_id, int *bucket); 397 void First_Edge(int *id1,int *id2, int *id3); 398 void Last_Edge(int *id1, int *id2, int *id3, BOOL save); 399 400 void preserve_strip_orientation_with_normal(FILE *output, 401 int vertex1, 402 int normal1, 403 int vertex2, 404 int normal2, 405 int vertex3, 406 int normal3); 407 408 void preserve_strip_orientation_with_texture( FILE *output, 409 int vertex1, 410 int texture1, 411 int vertex2, 412 int texture2, 413 int vertex3, 414 int texture3); 415 416 void preserve_strip_orientation_with_texture_and_normal( FILE *output, 417 int vertex1, 418 int texture1, 419 int normal1, 420 int vertex2, 421 int texture2, 422 int normal2, 423 int vertex3, 424 int texture3, 425 int normal3); 426 427 void preserve_strip_orientation(FILE *output, 428 int vertex1, 429 int vertex2, 430 int vertex3); 431 432 void find_triangle_orientation( int vertex1, 433 int vertex2, 434 int vertex3, 435 int *original_vertex); 436 437 /** local.h 438 */ 439 void Find_StripsEx( FILE *output, int *ties, 440 int tie, int triangulate, 441 int swaps, int *next_id); 442 void SGI_Strip(int num_faces,FILE *output, int ties,int triangulate); 443 444 /** outputex.h 445 */ 446 void Output_TriEx(int id1, int id2, int id3, FILE *output, 447 int flag,int where); 448 void Extend_BackwardsEx(int face_id, FILE *output, int *ties, 449 int tie, int triangulate, 450 int swaps,int *next_id); 451 void Polygon_OutputEx(P_ADJACENCIES temp,int face_id,int bucket, 452 ListHead *pListHead, FILE *output, 453 int *ties, int tie,int triangulate, int swaps, 454 int *next_id, int where); 455 456 /** sgi_triang.h 457 */ 458 int Adjacent(int id2,int id1, int *list, int size); 459 void Build_SGI_Table(int num_faces); 460 void Non_Blind_Triangulate( int size,int *index, 461 FILE *output,int next_face_id, 462 int face_id,int where, 463 int color1,int color2,int color3); 464 void Blind_Triangulate(int size, int *index, BOOL begin, int where); 465 void Rearrange_Index(int *index, int size); // static. 466 void Delete_From_List(int id,int *list, int *size); // static. 467 void Triangulate_Quad(int out_edge1,int out_edge2,int in_edge1, 468 int in_edge2,int size,int *index, 469 int reversed,int where); // static. 470 void Triangulate_Polygon( int out_edge1,int out_edge2, 471 int in_edge1, int in_edge2, 472 int size, int *index, 473 FILE *output, int reversed, 474 int face_id, int where, 475 int color1, int color2, 476 int color3); // static. 477 478 void Triangulate( int out_edge1,int out_edge2,int in_edge1, 479 int in_edge2,int size,int *index, 480 FILE *output,int reversed,int face_id, int where, 481 int color1, int color2,int color3); // static. 482 483 /** struct.h 484 */ 485 int Get_Edge( int *edge1,int *edge2, 486 int *index,int face_id, 487 int size, int id1, int id2); 488 int Update_Adjacencies( int face_id,int *next_bucket, 489 int *e1,int *e2,int *ties); 490 void Update_Face( int *next_bucket, int *min_face, 491 int face_id, int *e1, 492 int *e2, int temp1, 493 int temp2, int *ties); // static. 494 void Delete_Adj(int id1, int id2,int *next_bucket, 495 int *min_face,int current_face,int *e1, 496 int *e2,int *ties); // static. 497 /** common.h 498 */ 499 int Old_Adj(int face_id); 500 int Number_Adj(int id1, int id2, int curr_id); 501 int Min_Adj(int id); 502 void Check_In_Polygon(int face_id, int *min, int size); 503 void New_Face (int face_id, int v1, int v2, int v3); 504 void New_Size_Face(int face_id); 505 void Check_In_Quad(int face_id,int *min); 506 int Get_Output_Edge(int face_id, int size, int *index,int id2,int id3); 507 void Get_Input_Edge(int *index,int id1, 508 int id2,int id3, 509 int *new1,int *new2, 510 int size,int face_id); 511 int Find_Face(int current_face, int id1, 512 int id2, int *bucket); 513 BOOL Look_Up(int id1,int id2,int face_id); 514 void Add_Id_Strips(int id, int where); 515 int Num_Adj(int id1, int id2); 516 void Add_Sgi_Adj(int bucket,int face_id); 517 void Find_Adjacencies(int num_faces); 518 void Edge_Least(int *index,int *new1, 519 int *new2,int face_id,int size); // static. 520 521 /** ties.h 522 */ 523 void Clear_Ties(); 524 void Add_Ties(int id); 525 int Get_Next_Face(int t, int face_id, int triangulate); 526 int Alternate_Tie(); // static. 527 int Random_Tie(); // static. 528 int Look_Ahead(int id); // static. 529 int Random_Look(int id[],int count); // static. 530 int Look_Ahead_Tie(); // static. 531 int Sequential_Tri(int *index); // static. 532 int Sequential_Quad(int *index, int triangulate); // static. 533 void Whole_Output(int in1, int *index, int size, 534 int *out1,int *out2); // static. 535 int Sequential_Poly(int size,int *index,int triangulate); // static. 536 int Sequential_Tie(int face_id,int triangulate); // static. 537 538 /** add.h 539 */ 540 BOOL norm_array(int id,int vertex, 541 double normal_difference, 542 struct vert_struct *n,int num_vert); 543 void add_texture(int id,BOOL vertex); 544 int add_vert_id(int id, int index_count); 545 void add_norm_id(int id, int index_count); 546 void AddNewFace(int ids[MAX1],int vert_count, 547 int face_id,int norms[MAX1]); 548 void CopyFace(int ids[MAX1],int vert_count, 549 int face_id,int norms[MAX1]); 550 void Add_AdjEdge( int v1,int v2, 551 int fnum,int index1); 552 BOOL new_vertex(double difference,int id1, 553 int id2,struct vert_struct *n); // static. 554 BOOL Check_VN(int vertex,int normal, struct vert_added *added); // static. 555 556 /** options.h 557 */ 558 enum file_options {ASCII,BINARY}; 559 enum tie_options {FIRST, RANDOM, ALTERNA, LOOK, SEQUENTIAL}; 560 enum triangulation_options {PARTIAL,WHOLE}; 561 562 void print_usage(void); 563 float get_options(int argc, char **argv, 564 int *f, int *t, 565 int *tr, int *group, 566 int *orientation); 567 int power_10(int power); // static. 568 float power_negative(int power); // static. 569 float convert_array(int num[],int stack_size); // static. 570 571 /** sgi_triangex.h 572 */ 573 int AdjacentEx(int id2,int id1, int *list, int size); 574 void Delete_From_ListEx(int id,int *list, int size); 575 void Triangulate_PolygonEx( int out_edge1,int out_edge2,int in_edge1, 576 int in_edge2,int size,int *index, 577 FILE *fp,int reversed,int face_id, 578 int where); 579 void Non_Blind_TriangulateEx( int size,int *index, 580 FILE *output,int next_face_id, 581 int face_id,int where); 582 void Rearrange_IndexEx(int *index, int size); 583 void Blind_TriangulateEx( int size, int *index, 584 BOOL begin, int where); 585 void Triangulate_QuadEx(int out_edge1,int out_edge2,int in_edge1, 586 int in_edge2, int size, int *index, 587 int reversed, int where); // static. 588 void TriangulateEx( int out_edge1,int out_edge2, 589 int in_edge1, int in_edge2, 590 int size, int *index, 591 FILE *output, int reversed, 592 int face_id, int where); // static. 593 594 /** structex.h 595 */ 596 int Get_EdgeEx( int *edge1,int *edge2,int *index,int face_id, 597 int size, int id1, int id2); 598 void Delete_AdjEx(int id1, int id2, 599 int *next_bucket,int *min_face, 600 int current_face,int *e1, 601 int *e2,int *ties); 602 int Change_FaceEx(int face_id,int in1,int in2, 603 ListHead *pListHead, BOOL no_check); 604 int Update_AdjacenciesEx( int face_id,int *next_bucket, 605 int *e1, int *e2, 606 int *ties); 607 int Min_Face_AdjEx(int face_id,int *next_bucket,int *ties); 608 609 void Update_FaceEx( int *next_bucket,int *min_face, 610 int face_id, int *e1, 611 int *e2,int temp1, 612 int temp2,int *ties); // static. 613 614 void Find_Adj_TallyEx(int id1, int id2, 615 int *next_bucket, int *min_face, 616 int current_face, int *ties); // static. 617 618 /** partial.h 619 */ 620 void Partial_Triangulate(int size, int *index, 621 FILE *output, int next_face_id, 622 int face_id, int *next_id, 623 ListHead *pListHead, 624 P_ADJACENCIES temp, int where); 625 626 627 void Inside_Polygon(int size, int *index, 628 int face_id, ListHead *pListHead, 629 int where); 630 631 void P_Triangulate_Quad(int out_edge1,int out_edge2, 632 int in_edge1, int in_edge2, 633 int size, int *index, 634 int reversed, int face_id, 635 ListHead *pListHead, 636 P_ADJACENCIES temp, 637 int where); // static. 638 void P_Triangulate_Polygon( int out_edge1,int out_edge2, 639 int in_edge1, int in_edge2, 640 int size, int *index, 641 FILE *fp, int reversed, 642 int face_id, int *next_id, 643 ListHead *pListHead, 644 P_ADJACENCIES temp2, 645 int where); // static. 646 void P_Triangulate( int out_edge1,int out_edge2,int in_edge1, 647 int in_edge2, int size, int *index, 648 FILE *output, int reversed, int face_id, 649 int *next_id, ListHead *pListHead, 650 P_ADJACENCIES temp,int where); // static. 651 void Input_Edge(int face_id, int *index, 652 int size, int in_edge1, 653 int in_edge2, ListHead *pListHead, 654 int where); // static. 655 656 /** output.h 657 */ 658 int Finished(int *swap, FILE *output, int startnewstrip); 659 void Output_Tri(int id1, int id2, int id3,BOOL end); 660 int Extend_Face(int face_id,int e1,int e2,int *swaps,FILE *bands, 661 int color1,int color2,int color3,int *vert_norm, 662 int normals,int *vert_texture,int texture); 663 int Polygon_Output( P_ADJACENCIES temp, int face_id, 664 int bucket, ListHead *pListHead, 665 BOOL first, int *swaps, 666 FILE *bands, int color1, 667 int color2, int color3, 668 BOOL global, BOOL end); // static. 669 /** free.h 670 */ 671 void Free_Strips(); 672 void End_Face_Struct(int numfaces); 673 void End_Edge_Struct(int numverts); 674 void ParseAndFreeList( ListHead *pListHead ); // static. 675 void FreeFaceTable(int nSize); // static. 676 void FreeEdgeTable(int nSize); // static. 677 678 /** newpolve.h 679 */ 680 void Find_Bands(int numfaces, FILE *output_file, int *swaps, int *bands, 681 int *cost, int *tri, int norms, int *vert_norms, 682 int texture, int *vert_texture); 683 void Save_Walks(int numfaces); 684 void Save_Rest(int *numfaces); 685 int Calculate_Walks(int lastvert,int y, PF_FACES temp2); // static. 686 BOOL Check_Right( int last_seen,PF_FACES temp2, 687 int y,int face_id); // static. 688 int Update_and_Test(PF_FACES temp2,int y, 689 BOOL first,int distance, 690 int lastvert, int val); // static. 691 int Test_Adj( PF_FACES temp2,int x, 692 int north,int distance, 693 int lastvert, int value); // static. 694 int Find_Max( PF_FACES temp2, int lastvert, 695 int north, int left, 696 int *lastminup, int *lastminleft); // static. 697 void Mark_Face( PF_FACES temp2, int color1, 698 int color2, int color3, 699 FILE *output_file, BOOL end, 700 int *edge1, int *edge2, 701 int *face_id, int norms, 702 int texture); // static. 703 void Assign_Walk( int lastvert, PF_FACES temp2, 704 int front_walk, int y, 705 int back_walk); // static. 706 void Fast_Reset(int x); // static. 707 void Reset_Max( PF_FACES temp2,int face_id, 708 int north,int last_north, 709 int orientation,int last_left, 710 FILE *output_file,int color1, 711 int color2,int color3, 712 BOOL start); // static. 713 int Peel_Max( PF_FACES temp2,int face_id, 714 int north,int last_north, 715 int orientation,int last_left, 716 FILE *output_file,int color1, 717 int color2,int color3, 718 BOOL start, int *swaps_added, 719 int norms, int texture); // static. 720 721 /** auxiliar.h 722 */ 723 FILE *OpenOutputFile(char *fname); 724 void AllocateStruct(int num_faces, 725 int num_vert, 726 int num_nvert, 727 int num_texture); 728 void miReadFile(char *fname, char *file_open, FILE *bands,Geometry::SubMesh *geoSubMesh); 729 int stripify( char *fname, 730 Geometry::Mesh *geoMesh); 731 73 732 public: 74 75 733 /// Class constructor, receives as a parameter a const pointer to the object that describes a mesh. 76 734 CustomStripifier(); 77 735 78 CustomStripifier( const Geometry::Mesh*geoMesh);736 CustomStripifier(const Geometry::Mesh *geoMesh); 79 737 80 738 /// Class destructor. … … 92 750 /// Returns the stripified mesh. 93 751 Mesh * GetMesh(); 94 752 95 753 // Set the progress bar function. 96 754 void SetProgressFunc(Geometry::TIPOFUNC upb); … … 98 756 // Sets what is the submesh that stores the leaves 99 757 void SetSubMeshLeaves(size_t submesh); 758 100 759 }; 101 760 -
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoSerializer.h
r774 r980 56 56 // GPR. 57 57 void WriteData(const String &string); 58 void WriteData(const char *string); 58 59 // fin GPR. 59 60 -
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoSubMesh.h
r891 r980 49 49 MeshType mType; ///< Type of mesh 50 50 51 char mMaterialName[255]; ///< Material name 52 51 53 //OSCAR 52 54 std::vector <VertexBoneAssignment> mBones;
Note: See TracChangeset
for help on using the changeset viewer.