Introduced CMake build option for compiling double or float versions of osg::BoundingSphere and osg::BoundingBox.

Introduced code in BoundgingSphere, BoundingBox, ProxyNode and LOD to utilise the above settings.

Added Matrix::value_type, Plane::value_type, BoundingSphere::value_type and BoundingBox::value_type command line 
options that report where the types of floats or doubles.
This commit is contained in:
Robert Osfield
2008-04-03 18:36:50 +00:00
parent fe5c019608
commit 2a54ff3e4a
11 changed files with 225 additions and 78 deletions

View File

@@ -248,12 +248,37 @@ inline Vec4d::value_type operator * (const Vec3d& lhs,const Vec4d& rhs)
return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+rhs[3];
}
/** Compute the dot product of a (Vec3,1.0) and a Vec4d. */
inline Vec4d::value_type operator * (const Vec3f& lhs,const Vec4d& rhs)
{
return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+rhs[3];
}
/** Compute the dot product of a (Vec3,1.0) and a Vec4d. */
inline Vec4d::value_type operator * (const Vec3d& lhs,const Vec4f& rhs)
{
return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+rhs[3];
}
/** Compute the dot product of a Vec4d and a (Vec3,1.0). */
inline Vec4d::value_type operator * (const Vec4d& lhs,const Vec3d& rhs)
{
return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+lhs[3];
}
/** Compute the dot product of a Vec4d and a (Vec3,1.0). */
inline Vec4d::value_type operator * (const Vec4d& lhs,const Vec3f& rhs)
{
return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+lhs[3];
}
/** Compute the dot product of a Vec4d and a (Vec3,1.0). */
inline Vec4d::value_type operator * (const Vec4f& lhs,const Vec3d& rhs)
{
return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+lhs[3];
}
} // end of namespace osg
#endif