Changeset 980 for GTP/trunk/Lib/Geom/shared/GeoTool/include
- Timestamp:
- 05/24/06 10:47:49 (19 years ago)
- Location:
- GTP/trunk/Lib/Geom/shared/GeoTool/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshLoader.h
r891 r980 90 90 }; 91 91 92 /* 92 93 // Bounding Box data. 93 94 struct GeometryBounds … … 101 102 float radius; 102 103 }; 104 */ 103 105 104 106 /// Mesh class interface … … 111 113 unsigned int numVertices; 112 114 unsigned long long_actual; 113 char *nom_salida;114 115 size_t currentSubMesh; 115 116 … … 156 157 void readSubMesh(FILE *f, Mesh *geoMesh, int option); 157 158 159 // Read skeleton name. 160 void readSkeletonLink(FILE *f, Mesh *geoMesh, int option); 161 162 // Read bone assignment. 163 void readMeshBoneAssignment(FILE *f, Mesh *geoMesh, int option); 164 165 // Read bone assignment. 166 void readSubMeshBoneAssignment(FILE *f, SubMesh *geoSubMesh, int option); 167 158 168 // Read a mesh lod information. 159 169 void readMeshLodInfo(FILE *f, Mesh *geoMesh); … … 164 174 // Read a mesh file. 165 175 void readMesh(FILE *f, Mesh *geoMesh, int option); 176 177 // Read bounding box settings. 178 void readMeshBounds(FILE *f, Mesh *geoMesh, int option); 166 179 167 180 // Writes the strips list. … … 171 184 SubMesh * removeDegenerateTriangles(SubMesh *geoSubMesh); 172 185 186 // Sets coods between -1 and 1. 187 void normalizeModel(Mesh *geoMesh); 188 173 189 public: 174 190 -
GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshSaver.h
r774 r980 3 3 * ========================================================================== 4 4 * PROYECT: GAME TOOLS 5 * =========================================================================*/ 6 /** CONTENT: 7 * 8 * 9 * @file GeoMeshSaver.h 10 /*===========================================================================*/ 5 * ========================================================================*/ 6 /* CONTENT: 7 * 8 * 9 * @file GeoMeshSaver.h 10 * ========================================================================*/ 11 11 12 #ifndef __GEO_MESH_SAVER__ 12 13 #define __GEO_MESH_SAVER__ … … 24 25 25 26 // Mesh Bounds. 26 GeometryBounds mMeshBounds;27 //GeometryBounds mMeshBounds; 27 28 28 29 // Write in the file. … … 32 33 // is skeletally animated or not. 33 34 bool mSkeletallyAnimated; 34 35 // Material of the mesh.36 String mMaterialName;37 35 38 36 // Write the main mesh. … … 48 46 void writeGeometry(VertexBuffer *vertexBuffer); 49 47 50 // TODO:Write Mesh Bounds.51 void writeMeshBounds( GeometryBounds bounds);48 // Write Mesh Bounds. 49 void writeMeshBounds(Mesh *geoMesh); 52 50 53 // Calc the mesh size in bytes.51 // Calculate the mesh size in bytes. 54 52 size_t calcMeshSize(const Mesh *geoMesh); 55 53 56 // Calc the size in bytes for the submesh.54 // Calculate the size in bytes for the submesh. 57 55 size_t calcSubMeshSize(const SubMesh *geoSubMesh); 58 56 59 // Calc the geometry size in bytes.57 // Calculate the geometry size in bytes. 60 58 size_t calcGeometrySize(const VertexBuffer* vertexBuffer); 59 60 // Calculate the skeleton link size in bytes. 61 size_t calcSkeletonLinkSize(const Mesh *geoMesh); 61 62 62 63 // Write the file header. … … 85 86 void writeBools( const bool id, 86 87 unsigned long count); 88 89 // Write skeleton name. 90 void writeSkeletonLink(const String &string); 91 92 void writeMeshBoneAssignment(const VertexBoneAssignment& assign); 93 94 void writeSubMeshBoneAssignment(const VertexBoneAssignment& assign); 95 96 // unnormalize geometry model. 97 void unnormalizeModel(Mesh *geoMesh); 98 87 99 public: 88 100 89 101 // Constructors. 90 102 GeoMeshSaver(); 91 92 GeoMeshSaver(GeometryBounds bounds);93 103 94 104 // Destroyer. … … 101 111 String getMaterialName(); 102 112 103 // Set Mesh Bounds.104 void setMeshBounds(GeometryBounds bounds);105 106 113 // Saves a Mesh into a file. 107 114 int save(Mesh *geoMesh, const char *fileNameMesh); -
GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshView.h
r895 r980 2 2 #ifndef GeoMeshView_h 3 3 #define GeoMeshView_h 4 #include "GL/glew.h" 5 #ifdef _WIN32 6 #include "GL/wglew.h" 7 #endif 4 8 5 9 #include <fltk/events.h> … … 11 15 #include <GeoVertexBuffer.h> 12 16 #include <GeoMesh.h> 13 //#ifndef GeoMeshViewUI_h14 17 #include <GeoMeshSaver.h> 15 18 #include <GeoMeshViewUI.h> 16 19 17 //#endif18 20 namespace Geometry{ class LodTreeLibrary; } 19 21 … … 120 122 void smooth(){glShadeModel(GL_SMOOTH);}; 121 123 124 // Change Open GL context. 125 #ifdef _WIN32 126 HDC hOldDC; 127 HGLRC hOldRC; 128 #endif 129 void saveContext() 130 { 131 #ifdef _WIN32 132 hOldDC = wglGetCurrentDC(); 133 hOldRC = wglGetCurrentContext(); 134 #endif 135 } 136 void restoreContext() 137 { 138 #ifdef _WIN32 139 wglMakeCurrent( hOldDC, hOldRC ); 140 #endif 141 } 142 122 143 // Fits the object in the window view. 123 144 void fit() … … 142 163 143 164 // Gets the bounding box. 144 Geometry::GeometryBounds getBoundingBox();165 //Geometry::GeometryBounds getBoundingBox(); 145 166 146 167 // Store one random color to each strip. … … 151 172 152 173 // JGA 153 // Sets the colorsubmeshi variable154 void set ColorSubmeshi(int submeshIndex);174 // Sets the submesh selected. 175 void setSubMeshSelected(int submeshIndex); 155 176 156 177 // Sets the leaves submesh index. 157 void setLeavesSub mesh(int submeshIndex);178 void setLeavesSubMesh(int submeshIndex); 158 179 159 180 // Gets the leaves submesh index. 160 int getLeavesSub mesh();181 int getLeavesSubMesh(); 161 182 162 183 // Gets the triangle count of the current lod. … … 165 186 // Sets the lodstripslibrary object. 166 187 void setLodStripsLibrary(Geometry::LodStripsLibrary *lodstrips); 188 167 189 // Sets the lodtreeslibrary object. 168 190 void setLodTreesLibrary(Geometry::LodTreeLibrary *lodtrees); … … 191 213 192 214 // Stores the index of the mesh to paint of red color. 193 int colorsubmeshi;215 int mSubMeshSelected; 194 216 195 217 // Frames per second. … … 203 225 float zMed; 204 226 205 int leavesSub mesh;227 int leavesSubMesh; 206 228 207 229 // Submesh count. … … 214 236 215 237 // Paint the mesh object. 216 void drawGeoMesh( int selectedMesh);217 void drawTriangleList(int submesh, bool selectedMesh );238 void drawGeoMesh(bool paintWire); 239 void drawTriangleList(int submesh, bool selectedMesh, bool paintWire); 218 240 void drawTriangleStrip(int submesh); 219 241 void drawLodStrip(); -
GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshViewUI.h
r895 r980 2 2 #ifndef GeoMeshViewUI_h 3 3 #define GeoMeshViewUI_h 4 #include "GL/glew.h" 5 #ifdef _WIN32 6 #include "GL/wglew.h" 7 #endif 4 8 #include <stdio.h> 5 9 #include <stdlib.h> … … 37 41 #include <GeoMeshView.h> 38 42 #include <GeoMeshSaver.h> 43 #include <GeoMeshSimplifier.h> 39 44 #include <GeoMeshStripifier.h> 40 #include <GeoMeshSimplifier.h>41 45 #include <GeoTreeSimplifier.h> 42 46 #include "GeoTreeSimpSequence.h" 43 47 #include "GeoLodStripsConstructor.h" 44 #include "GeoLodTreeConstructor.h"45 48 #include "GeoLodTreeLibrary.h" 46 49 … … 69 72 { 70 73 QSLIM, 71 HOJAS 74 HOJAS, 75 VIEWPOINTDRIVEN 72 76 }; 73 77 … … 103 107 LodTreeLibrary *lodTreeLib; 104 108 105 // Mesh Bounds.106 GeometryBounds mMeshBounds;107 108 109 MeshSimplifier *mMeshSimplifier; 109 110 TreeSimplifier *mTreeSimplifier; 110 111 char *nombremesh; 111 SimplificationType simplifica cionState;112 SimplificationType simplificationState; 112 113 ProgressBarType progressBarType; 113 114 … … 334 335 fltk::Slider *mLodTreeSlider; 335 336 fltk::CheckButton *mGeometryBased; 336 fltk::CheckButton *m ImageBased;337 fltk::CheckButton *mViewPointDriven; 337 338 fltk::CheckButton *mChangeVertices; 338 339 fltk::CheckButton *mChangeTexture;
Note: See TracChangeset
for help on using the changeset viewer.