Changeset 522 for trunk/VUT/GtpVisibilityPreprocessor/src
- Timestamp:
- 01/12/06 13:20:25 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor/src
- Files:
-
- 1 added
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Beam.cpp
r513 r522 65 65 return result; 66 66 } 67 68 69 void Beam::ComputeFrustum(float &near, float &far, 70 float &left, float &right, 71 float &bottom, float &top, 72 const AxisAlignedBox3 &sceneBBox) 73 { 74 const float xDirRange = mDirBox.Max().x - mDirBox.Min().x; 75 const float yDirRange = mDirBox.Max().y - mDirBox.Min().y; 76 77 near = 1; // NOTE: what is the best value for near and far plane? 78 far = sceneBBox.Size(sceneBBox.Size().DrivingAxis()); 79 80 left = 1.0f / tan(xDirRange * 0.5); 81 right = 1.0f / tan(xDirRange * 0.5); 82 83 bottom = 1.0f / tan(yDirRange * 0.5); 84 top = 1.0f / tan(yDirRange * 0.5); 85 } -
trunk/VUT/GtpVisibilityPreprocessor/src/Beam.h
r513 r522 35 35 const AxisAlignedBox3 &dBox); 36 36 37 38 int 39 ComputeIntersection(const AxisAlignedBox3 &box); 37 void ComputeFrustum(float &near, float &far, 38 float &left, float &right, 39 float &bottom, float &top, 40 const AxisAlignedBox3 &sceneBBox); 41 42 int ComputeIntersection(const AxisAlignedBox3 &box); 40 43 41 44 bool IsValid() { return mFlags & VALID; } … … 45 48 { 46 49 } 47 48 50 }; 49 51
Note: See TracChangeset
for help on using the changeset viewer.