- Timestamp:
- 01/10/06 11:59:58 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Beam.cpp
r510 r511 1 #include "VssRay.h" 1 2 #include "Beam.h" 2 #include "VssRay.h"3 4 3 5 4 6 5 7 6 void 8 Beam::Construct(const AxisAlignedBox3 &box,7 MyBeam::Construct(const AxisAlignedBox3 &box, 9 8 const AxisAlignedBox3 &dBox) 10 9 { … … 54 53 55 54 int 56 Beam::ComputeIntersection(constAxisAlignedBox3 &box)55 MyBeam::ComputeIntersection(const AxisAlignedBox3 &box) 57 56 { 58 57 int i; -
trunk/VUT/GtpVisibilityPreprocessor/src/Beam.h
r507 r511 3 3 4 4 #include <vector> 5 #include "AxisAlignedBox3.h" 6 5 7 using namespace std; 6 8 7 9 class KdNode; 8 10 class Intersectable; 9 #include "AxisAlignedBox3.h"10 11 11 class Beam {12 class MyBeam { 12 13 13 14 public: … … 28 29 vector<Plane3> mPlanes; 29 30 31 32 void Construct(const AxisAlignedBox3 &box, 33 const AxisAlignedBox3 &dBox); 34 35 36 int 37 ComputeIntersection(const AxisAlignedBox3 &box); 38 30 39 bool IsValid() { return mFlags & VALID; } 31 40 bool SetValid() { return mFlags |= VALID; } 32 41 33 Beam():mFlags(STORE_KD_NODES+STORE_OBJECTS),mKdNodes(0), mObjects(0)42 MyBeam():mFlags(STORE_KD_NODES+STORE_OBJECTS), mKdNodes(0), mObjects(0) 34 43 { 35 44 } 36 37 void Construct(const AxisAlignedBox3 &box,38 const AxisAlignedBox3 &dBox);39 40 41 int42 ComputeIntersection(const AxisAlignedBox3 &box);43 44 45 45 46 }; -
trunk/VUT/GtpVisibilityPreprocessor/src/Environment.cpp
r508 r511 1229 1229 "0"); 1230 1230 1231 RegisterOption("ViewCells.maxPvs ",1232 opt Int,1233 "view_cells_max_pvs =",1234 " 300");1231 RegisterOption("ViewCells.maxPvsRatio", 1232 optFloat, 1233 "view_cells_max_pvs_ratio=", 1234 "0.1"); 1235 1235 1236 1236 RegisterOption("ViewCells.filename", -
trunk/VUT/GtpVisibilityPreprocessor/src/GlRenderer.cpp
r507 r511 5 5 #include "Pvs.h" 6 6 #include "Viewcell.h" 7 #include "Beam. cpp"7 #include "Beam.h" 8 8 9 9 #include <GL/glext.h> … … 118 118 glGetOcclusionQueryuivNV = (PFNGLGETOCCLUSIONQUERYUIVNVPROC) 119 119 wglGetProcAddress("glGetOcclusionQueryuivNV"); 120 121 // second depth buffer texture 122 GLuint shadowMap; 123 const int shadowMapSize=512; 124 125 126 glGenTextures(1, &shadowMap); 127 glBindTexture(GL_TEXTURE_2D, shadowMap); 128 129 glTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, shadowMapSize, 130 shadowMapSize, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL); 131 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 132 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 133 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); 134 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); 120 135 } 121 136 … … 535 550 GlRendererBuffer::SampleBeamContributions( 536 551 Intersectable *sourceObject, 537 Beam &beam,552 MyBeam &beam, 538 553 const int desiredSamples, 539 554 BeamSampleStatistics &stat … … 589 604 GlRendererBuffer::SampleViewpointContributions( 590 605 Intersectable *sourceObject, 591 Beam &beam,606 MyBeam &beam, 592 607 const int desiredSamples, 593 608 BeamSampleStatistics &stat -
trunk/VUT/GtpVisibilityPreprocessor/src/GlRenderer.h
r507 r511 17 17 class Intersectable; 18 18 class Material; 19 class Beam;19 class MyBeam; 20 20 21 21 struct PvsRenderStatistics { … … 159 159 void SampleBeamContributions( 160 160 Intersectable *sourceObject, 161 Beam &beam,161 MyBeam &beam, 162 162 const int samples, 163 163 BeamSampleStatistics &stat … … 167 167 SampleViewpointContributions( 168 168 Intersectable *sourceObject, 169 Beam &beam,169 MyBeam &beam, 170 170 const int desiredSamples, 171 171 BeamSampleStatistics &stat -
trunk/VUT/GtpVisibilityPreprocessor/src/KdTree.cpp
r507 r511 968 968 int 969 969 KdTree::CastBeam( 970 Beam &beam970 MyBeam &beam 971 971 ) 972 972 { -
trunk/VUT/GtpVisibilityPreprocessor/src/KdTree.h
r505 r511 16 16 class Intersectable; 17 17 //class KdViewCell; 18 class Beam;18 class MyBeam; 19 19 20 20 // -------------------------------------------------------------- … … 289 289 int 290 290 CastBeam( 291 Beam &beam291 MyBeam &beam 292 292 ); 293 293 -
trunk/VUT/GtpVisibilityPreprocessor/src/RssTree.h
r507 r511 22 22 #include "AxisAlignedBox3.h" 23 23 #include "Halton.h" 24 #include "beam.h" 24 #include "Beam.h" 25 #include "Statistics.h" 26 #include "Ray.h" 27 28 #include "Containers.h" 25 29 26 30 #define USE_KDNODE_VECTORS 1 … … 29 33 30 34 31 #include "Statistics.h"32 #include "Ray.h"33 34 #include "Containers.h"35 35 // -------------------------------------------------------------- 36 36 // Static statistics for kd-tree search … … 420 420 HaltonSequence halton; 421 421 422 Beam mBeam;422 MyBeam mBeam; 423 423 424 424 RssTreeLeaf(RssTreeInterior *p, -
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp
r509 r511 87 87 environment->GetBoolValue("VspBspTree.splitUseOnlyDrivingAxis", mOnlyDrivingAxis); 88 88 environment->GetBoolValue("VspBspTree.PostProcess.useRaysForMerge", mUseRaysForMerge); 89 environment->GetIntValue("ViewCells.maxPvs", mMaxPvs); 89 90 environment->GetIntValue("ViewCells.pvsInvalid", mMaxPvsRatio); 90 91 91 92 //-- termination criteria for axis aligned split … … 275 276 Intersectable::NewMail(); 276 277 278 int numObj = 0; 277 279 //-- extract polygons intersected by the rays 278 280 for (rit = sampleRays.begin(); rit != rit_end; ++ rit) … … 287 289 MeshInstance *obj = dynamic_cast<MeshInstance *>(ray->mTerminationObject); 288 290 AddMeshToPolygons(obj->GetMesh(), polys, obj); 291 ++ numObj; 289 292 //-- compute bounding box 290 293 if (!forcedBoundingBox) … … 299 302 MeshInstance *obj = dynamic_cast<MeshInstance *>(ray->mOriginObject); 300 303 AddMeshToPolygons(obj->GetMesh(), polys, obj); 304 ++ numObj; 305 301 306 //-- compute bounding box 302 307 if (!forcedBoundingBox) … … 305 310 } 306 311 307 //-- compute bounding box 308 //if (!forcedBoundingBox) Polygon3::IncludeInBox(polys, mBox); 312 mMaxPvs = (int)(mMaxPvsRatio * (float)numObj); 309 313 310 314 //-- store rays -
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.h
r508 r511 692 692 int mMaxPvs; 693 693 694 int mMaxPvsRatio; 695 694 696 /// View cell corresponding to the space outside the valid view space 695 697 BspViewCell *mOutOfBoundsCell;
Note: See TracChangeset
for help on using the changeset viewer.