- Timestamp:
- 06/10/08 23:21:11 (17 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/CHC_revisited
- Files:
-
- 4 added
- 6 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/CHC_revisited/Bvh.h
r2752 r2753 559 559 int PostProcessLeaves(BvhLeafContainer &leaves); 560 560 561 //bool CreateTighterBoundsForLeaf(BvhLeaf *leaf, Point3f *triangles, int triangleCount);562 563 ///Point3f *CollectTriangles(BvhLeaf *leaf, int &triangleCount);564 561 565 562 int IsWithinViewFrustumLocal(BvhNode *node); -
GTP/trunk/App/Demos/Vis/CHC_revisited/RenderTraverser.h
r2751 r2753 14 14 namespace CHCDemo 15 15 { 16 17 typedef stack<HierarchyNode *> TraversalStack;18 typedef queue<HierarchyNode *> QueryQueue;19 typedef priority_queue<HierarchyNode *, vector<HierarchyNode *>, myless<vector<HierarchyNode *>::value_type> > PriorityQueue;20 16 21 17 class RenderTraverser -
GTP/trunk/App/Demos/Vis/CHC_revisited/Vector3.h
r2752 r2753 44 44 Vector3() { } 45 45 46 Vector3(float x, float y, float z): 47 x(x), y(y), z(z) 48 { 49 } 50 Vector3(float v): 51 x(v), y(v), z(v) 52 { 53 } 46 Vector3(float x, float y, float z): x(x), y(y), z(z) 47 {} 48 49 Vector3(float v): x(v), y(v), z(v) 50 {} 54 51 /** Copy constructor. 55 52 */ -
GTP/trunk/App/Demos/Vis/CHC_revisited/chc_revisited.vcproj
r2751 r2753 193 193 </File> 194 194 <File 195 RelativePath=".\Camera.cpp" 196 > 197 </File> 198 <File 199 RelativePath=".\chcdemo.cpp" 200 > 201 </File> 202 <File 195 203 RelativePath=".\Geometry.cpp" 196 204 > 197 205 </File> 198 206 <File 199 RelativePath=".\ occquery.cpp"207 RelativePath=".\OcclusionQuery.cpp" 200 208 > 201 209 </File> … … 211 219 </File> 212 220 <File 221 RelativePath=".\Camera.h" 222 > 223 </File> 224 <File 213 225 RelativePath=".\Geometry.h" 214 226 > … … 216 228 <File 217 229 RelativePath=".\Material.h" 230 > 231 </File> 232 <File 233 RelativePath=".\OcclusionQuery.h" 218 234 > 219 235 </File> -
GTP/trunk/App/Demos/Vis/CHC_revisited/common.cpp
r2751 r2753 177 177 } 178 178 179 char * 180 TimeString() 179 char *TimeString() 181 180 { 182 181 time_t t; 183 182 time(&t); 183 184 184 return ctime(&t); 185 185 } 186 186 187 char * 188 GetAbsPath(char *name)187 188 char *GetAbsPath(char *name) 189 189 { 190 190 // char *url = new char[strlen(name)+1]; … … 192 192 193 193 // get the absolute path 194 int c = strlen(name);195 int i = c -1;194 size_t c = strlen(name); 195 int i = c - 1; 196 196 bool wasDot = false; 197 197 198 // search for double dot 198 for (;i>=0;i--) 199 if (name[i]=='.') { 199 for (; i >= 0; -- i) 200 { 201 if (name[i]=='.') 202 { 200 203 if (wasDot) 201 204 break; 202 205 wasDot = true; 203 } else 206 } 207 else 204 208 wasDot = false; 205 206 if (i>0) 207 i+=3; 208 if (i<0) 209 i=0; 210 211 char *url = new char[c-i+1]; 212 int j=0; 213 for (;i<c;i++,j++) 214 url[j] = name[i]; 215 url[j]=0; 216 217 return url; 209 } 210 211 if (i>0) 212 i+=3; 213 if (i<0) 214 i=0; 215 216 char *url = new char[c-i+1]; 217 218 int j=0; 219 220 for (;i<c;i++,j++) 221 url[j] = name[i]; 222 223 url[j]=0; 224 225 return url; 218 226 } 219 227 … … 230 238 char *GetPath(const char *s) 231 239 { 232 int i=strlen(s); 233 for (; i>0; i--) { 240 size_t i = strlen(s); 241 for (; i > 0; -- i) 242 { 234 243 if (s[i]=='/' || s[i]=='\\') 235 244 break; -
GTP/trunk/App/Demos/Vis/CHC_revisited/common.h
r2752 r2753 14 14 #include <limits.h> 15 15 #include <vector> 16 #include <queue> 17 16 18 17 19 … … 22 24 class BvhNode; 23 25 class BvhLeaf; 26 class OcclusionQuery; 24 27 25 28 … … 465 468 typedef std::vector<Triangle3> TriangleContainer; 466 469 467 468 } 469 470 #endif 471 472 473 474 475 476 477 478 470 typedef std::queue<OcclusionQuery *> QueryQueue; 471 //typedef std::priority_queue<BvhNode *, vector<BvhNode *>, myless<vector<BvhNode *>::value_type> > TraversalQueue; 472 473 } 474 475 #endif 476 477 478 479 480 481 482 483
Note: See TracChangeset
for help on using the changeset viewer.