- Timestamp:
- 01/05/06 20:41:52 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/AxisAlignedBox3.cpp
r492 r503 1786 1786 1787 1787 Vector3 invDirection; 1788 const float eps = 1e-6 ;1789 const float invEps = 1e6 ;1788 const float eps = 1e-6f; 1789 const float invEps = 1e6f; 1790 1790 1791 1791 // it does change the ray direction very slightly, … … 1793 1793 1794 1794 if (fabs(direction.x) < eps) { 1795 if (direction.x < 0.0 )1795 if (direction.x < 0.0f) 1796 1796 invDirection.x = -invEps; 1797 1797 else … … 1799 1799 } 1800 1800 else 1801 invDirection.x = 1.0 / direction.x;1801 invDirection.x = 1.0f / direction.x; 1802 1802 1803 1803 if (fabs(direction.y) < eps) { … … 1808 1808 } 1809 1809 else 1810 invDirection.y = 1.0 / direction.y;1810 invDirection.y = 1.0f / direction.y; 1811 1811 1812 1812 if (fabs(direction.z) < eps) { 1813 if (direction.z < 0.0 )1813 if (direction.z < 0.0f) 1814 1814 invDirection.z = -invEps; 1815 1815 else … … 1817 1817 } 1818 1818 else 1819 invDirection.z = 1.0 / direction.z;1820 1821 1822 1823 if (fabs(direction.x) < 0.001 ) {1819 invDirection.z = 1.0f / direction.z; 1820 1821 1822 1823 if (fabs(direction.x) < 0.001f) { 1824 1824 if (mMin.x < origin.x && mMax.x > origin.x) { 1825 1825 minx = -MAXFLOAT;
Note: See TracChangeset
for help on using the changeset viewer.