Added osg::State::getCurrentMode and osg::State::getCurrentAttribute().

Aded osg::clampAbove(..) and osg::clampBelow() template functions to
include/osg/Math.
This commit is contained in:
Robert Osfield
2002-05-21 08:59:26 +00:00
parent a57eae47f6
commit b8d8a8be27
3 changed files with 63 additions and 21 deletions

View File

@@ -73,6 +73,12 @@ const double PI_4 = 0.78539816339744830962;
template<typename T>
inline T clampTo(T v,T minimum,T maximum) { return v<minimum?minimum:v>maximum?maximum:v; }
template<typename T>
inline T clampAbove(T v,T minimum) { return v<minimum?minimum:v; }
template<typename T>
inline T clampBelow(T v,T maximum) { return v>maximum?maximum:v; }
template<typename T>
inline T sign(T v) { return v<0?-1:1; }