Changeset 308 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp
- Timestamp:
- 10/05/05 02:19:15 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp
r265 r308 1 1 #include "ViewCell.h" 2 2 #include "Mesh.h" 3 #include "Intersectable.h" 3 4 #include "MeshKdTree.h" 4 5 #include "Triangle3.h" 5 6 6 ViewCell::ViewCell(): mMesh(NULL)7 ViewCell::ViewCell(): MeshInstance(NULL) 7 8 { 8 9 } 9 10 10 ViewCell::ViewCell(Mesh *mesh): mMesh(mesh), mPvs(NULL)11 ViewCell::ViewCell(Mesh *mesh): MeshInstance(mesh) 11 12 { 12 13 } 13 14 14 ViewCell::~ViewCell() 15 { 16 // NOTE: should I really do this here? (I know that there is only one mesh per view cell) 17 DEL_PTR(mMesh); 18 } 19 20 Mesh *ViewCell::GetMesh() 21 { 22 return mMesh; 23 } 24 25 BspPvs *ViewCell::GetPVS() 15 ViewCellPvs &ViewCell::GetPvs() 26 16 { 27 17 return mPvs; 28 18 } 29 19 30 AxisAlignedBox3 ViewCell::GetBox()31 {32 return mMesh->mBox;33 }34 35 int ViewCell::CastRay(Ray &ray)36 {37 return 0;38 }39 40 bool ViewCell::IsConvex()41 {42 return mMesh->mIsConvex;43 }44 45 bool ViewCell::IsWatertight()46 {47 return mMesh->mIsWatertight;48 }49 50 float ViewCell::IntersectionComplexity()51 {52 return (float)mMesh->mFaces.size();53 }54 55 20 int ViewCell::Type() const 56 21 { 57 return VIEWCELL; 58 } 59 60 void ViewCell::GetRandomSurfacePoint(Vector3 &point, Vector3 &normal) 61 { 62 point = Vector3(0,0,0); 22 return VIEW_CELL; 63 23 } 64 24 … … 122 82 return new ViewCell(mesh); 123 83 } 84 85 void ViewCell::AddPassingRay(const Ray &ray, const int contributions) 86 { 87 mPassingRays.AddRay(ray, contributions); 88 }
Note: See TracChangeset
for help on using the changeset viewer.