Ignore:
Timestamp:
01/05/06 20:41:52 (19 years ago)
Author:
mattausch
Message:

added mesh creation function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/AxisAlignedBox3.cpp

    r492 r503  
    17861786   
    17871787  Vector3 invDirection; 
    1788   const float eps = 1e-6; 
    1789   const float invEps = 1e6; 
     1788  const float eps = 1e-6f; 
     1789  const float invEps = 1e6f; 
    17901790   
    17911791  // it does change the ray direction very slightly, 
     
    17931793   
    17941794  if (fabs(direction.x) < eps) { 
    1795     if (direction.x < 0.0) 
     1795    if (direction.x < 0.0f) 
    17961796      invDirection.x = -invEps; 
    17971797    else 
     
    17991799  } 
    18001800  else 
    1801     invDirection.x = 1.0 / direction.x; 
     1801    invDirection.x = 1.0f / direction.x; 
    18021802   
    18031803  if (fabs(direction.y) < eps) { 
     
    18081808  } 
    18091809  else 
    1810     invDirection.y = 1.0 / direction.y; 
     1810    invDirection.y = 1.0f / direction.y; 
    18111811   
    18121812  if (fabs(direction.z) < eps) { 
    1813     if (direction.z < 0.0) 
     1813    if (direction.z < 0.0f) 
    18141814      invDirection.z = -invEps; 
    18151815    else 
     
    18171817  } 
    18181818  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) { 
    18241824    if (mMin.x < origin.x && mMax.x > origin.x) { 
    18251825      minx = -MAXFLOAT; 
Note: See TracChangeset for help on using the changeset viewer.