Changeset 1763 for GTP/trunk/Lib/Vis/Preprocessing/src/Mesh.h
- Timestamp:
- 11/16/06 19:41:44 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Mesh.h
r1419 r1763 245 245 246 246 public: 247 MeshInstance(Mesh *mesh):Intersectable(), mMesh(mesh), mMaterial(NULL) 248 { 249 } 250 251 int GetRandomSurfacePoint(Vector3 &point, Vector3 &normal); 252 253 int 254 GetRandomVisibleSurfacePoint(Vector3 &point, 255 Vector3 &normal, 256 const Vector3 &viewpoint, 257 const int maxTries 258 ); 259 260 261 Mesh *GetMesh() { return mMesh; } 262 263 virtual AxisAlignedBox3 GetBox() const { 264 return mMesh->mBox; 265 } 266 267 virtual int CastRay(Ray &ray); 268 269 virtual bool IsConvex() const { return mMesh->mIsConvex; } 270 virtual bool IsWatertight() const { return mMesh->mIsWatertight; } 271 virtual float IntersectionComplexity() { return (float)mMesh->mFaces.size(); } 272 273 virtual int NumberOfFaces() const { return (int)mMesh->mFaces.size(); } 274 275 virtual int Type() const { return MESH_INSTANCE; } 276 277 virtual int 278 CastRay( 279 Ray &ray, 280 const vector<int> &faces 281 ); 247 MeshInstance(Mesh *mesh):Intersectable(), mMesh(mesh), mMaterial(NULL) 248 { 249 } 250 251 int GetRandomSurfacePoint(Vector3 &point, Vector3 &normal); 252 253 int GetRandomVisibleSurfacePoint(Vector3 &point, 254 Vector3 &normal, 255 const Vector3 &viewpoint, 256 const int maxTries 257 ); 258 259 260 virtual int GetRandomEdgePoint(Vector3 &point, 261 Vector3 &normal); 262 263 Mesh *GetMesh() { return mMesh; } 264 265 virtual AxisAlignedBox3 GetBox() const { 266 return mMesh->mBox; 267 } 268 269 virtual int CastRay(Ray &ray); 270 271 virtual bool IsConvex() const { return mMesh->mIsConvex; } 272 virtual bool IsWatertight() const { return mMesh->mIsWatertight; } 273 virtual float IntersectionComplexity() { return (float)mMesh->mFaces.size(); } 274 275 virtual int NumberOfFaces() const { return (int)mMesh->mFaces.size(); } 276 277 virtual int Type() const { return MESH_INSTANCE; } 278 279 virtual int 280 CastRay( 281 Ray &ray, 282 const vector<int> &faces 283 ); 282 284 283 285 … … 286 288 return mMesh->Describe(s); 287 289 } 288 290 289 291 /** Sets the material. this overrides the material from 290 292 the mesh itself. 291 293 */ 292 294 void SetMaterial(Material *mat); 293 295 294 296 /** Returns the material of this mesh instance. 295 297 if not defined, returns the material of the mesh itself. 296 298 */ 297 299 Material *GetMaterial() const;
Note: See TracChangeset
for help on using the changeset viewer.