Math Functions
[Base Functions, Math]
sqrt | |
|
| |
| OSG::Real32 | OSG::osgSqrt (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgSqrt (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgSqrt (const OSG::Real128 rValue) |
| OSG::Fixed32 | OSG::osgSqrt (const OSG::Fixed32 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgSqrt (const FloatTypeT rValue) |
cos | |
|
| |
| OSG::Real32 | OSG::osgCos (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgCos (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgCos (const OSG::Real128 rValue) |
| OSG::Fixed32 | OSG::osgCos (const OSG::Fixed32 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgCos (const FloatTypeT rValue) |
sin | |
|
| |
| OSG::Real32 | OSG::osgSin (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgSin (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgSin (const OSG::Real128 rValue) |
| OSG::Fixed32 | OSG::osgSin (const OSG::Fixed32 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgSin (const FloatTypeT rValue) |
tan | |
|
| |
| OSG::Real32 | OSG::osgTan (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgTan (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgTan (const OSG::Real128 rValue) |
| OSG::Fixed32 | OSG::osgTan (const OSG::Fixed32 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgTan (const FloatTypeT rValue) |
acos | |
|
| |
| OSG::Real32 | OSG::osgACos (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgACos (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgACos (const OSG::Real128 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgACos (const FloatTypeT rValue) |
asin | |
|
| |
| OSG::Real32 | OSG::osgASin (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgASin (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgASin (const OSG::Real128 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgASin (const FloatTypeT rValue) |
atan | |
|
| |
| OSG::Real32 | OSG::osgATan (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgATan (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgATan (const OSG::Real128 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgATan (const FloatTypeT rValue) |
atan2 | |
|
| |
| OSG::Real32 | OSG::osgATan2 (const OSG::Real32 rValue1, const OSG::Real32 rValue2) |
| OSG::Real64 | OSG::osgATan2 (const OSG::Real64 rValue1, const OSG::Real64 rValue2) |
| OSG::Real128 | OSG::osgATan2 (const OSG::Real128 rValue1, const OSG::Real128 rValue2) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgATan2 (const FloatTypeT rValue1, const FloatTypeT rValue2) |
abs | |
|
| |
| OSG::Real32 | OSG::osgAbs (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgAbs (const OSG::Real64 rValue) |
| OSG::Fixed32 | OSG::osgAbs (const OSG::Fixed32 rValue) |
| OSG::Real128 | OSG::osgAbs (const OSG::Real128 rValue) |
| template<class TypeT > | |
| TypeT | OSG::osgAbs (const TypeT rValue) |
pow | |
|
| |
| OSG::Real32 | OSG::osgPow (const OSG::Real32 rValue, const OSG::Real32 rExp) |
| OSG::Real64 | OSG::osgPow (const OSG::Real64 rValue, const OSG::Real64 rExp) |
| OSG::Real128 | OSG::osgPow (const OSG::Real128 rValue, const OSG::Real128 rExp) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgPow (const FloatTypeT rValue, const FloatTypeT rExp) |
log | |
|
| |
| OSG::Real32 | OSG::osgLog (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgLog (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgLog (const OSG::Real128 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgLog (const FloatTypeT rValue) |
exp | |
|
| |
| OSG::Real32 | OSG::osgExp (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgExp (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgExp (const OSG::Real128 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgExp (const FloatTypeT rValue) |
floor | |
|
| |
| OSG::Real32 | OSG::osgFloor (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgFloor (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgFloor (const OSG::Real128 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgFloor (const FloatTypeT rValue) |
ceil | |
|
| |
| OSG::Real32 | OSG::osgCeil (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgCeil (const OSG::Real64 rValue) |
| OSG::Real128 | OSG::osgCeil (const OSG::Real128 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgCeil (const FloatTypeT rValue) |
mod | |
|
| |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgMod (const FloatTypeT lValue, const FloatTypeT rValue) |
| OSG::Real32 | OSG::osgMod (const OSG::Real32 lValue, const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgMod (const OSG::Real64 lValue, const OSG::Real64 rValue) |
finite | |
|
| |
| template<class FloatTypeT > | |
| OSG::UInt32 | OSG::osgFinite (const FloatTypeT rValue) |
min / max | |
|
| |
| template<class TypeT > | |
| TypeT | OSG::osgMin (const TypeT lValue, const TypeT rValue) |
| template<class TypeT > | |
| TypeT | OSG::osgMax (const TypeT lValue, const TypeT rValue) |
| template<class TypeT > | |
| TypeT | OSG::osgClamp (const TypeT minVal, const TypeT val, const TypeT maxVal) |
sgn | |
|
| |
| template<class TypeT > | |
| Int8 | OSG::osgSgn (TypeT val) |
swap | |
|
| |
| template<class TypeT > | |
| void | OSG::osgSwap (TypeT &lValue, TypeT &rValue) |
degree2rad | |
|
| |
| OSG::Real32 | OSG::osgDegree2Rad (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgDegree2Rad (const OSG::Real64 rValue) |
| OSG::Fixed32 | OSG::osgDegree2Rad (const OSG::Fixed32 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgDegree2Rad (const FloatTypeT rValue) |
rad2degree | |
|
| |
| OSG::Real32 | OSG::osgRad2Degree (const OSG::Real32 rValue) |
| OSG::Real64 | OSG::osgRad2Degree (const OSG::Real64 rValue) |
| OSG::Fixed32 | OSG::osgRad2Degree (const OSG::Fixed32 rValue) |
| template<class FloatTypeT > | |
| TypeTraits< FloatTypeT > ::RealReturnType | OSG::osgRad2Degree (const FloatTypeT rValue) |
ispower2 | |
|
| |
| template<> | |
| bool | OSG::osgIsPower2< UInt32 > (const OSG::UInt32 rValue) |
| template<> | |
| bool | OSG::osgIsPower2< Int32 > (const OSG::Int32 rValue) |
| template<> | |
| bool | OSG::osgIsPower2< UInt64 > (const OSG::UInt64 rValue) |
| template<> | |
| bool | OSG::osgIsPower2< Int64 > (const OSG::Int64 rValue) |
nextpower2 | |
|
| |
| template<> | |
| OSG::UInt32 | OSG::osgNextPower2< UInt32 > (OSG::UInt32 rValue) |
| template<> | |
| OSG::Int32 | OSG::osgNextPower2< Int32 > (OSG::Int32 rValue) |
| template<> | |
| OSG::UInt64 | OSG::osgNextPower2< UInt64 > (OSG::UInt64 rValue) |
| template<> | |
| OSG::Int64 | OSG::osgNextPower2< Int64 > (OSG::Int64 rValue) |
Detailed Description
ToDo
Function Documentation
| OSG::Real32 OSG::osgSqrt | ( | const OSG::Real32 | rValue | ) | [inline] |
Return the square root of the argument, i.e. the number y that satisfies y2 == rValue. The argument must be nonnegative.
- Parameters:
-
[in] rValue The number to compute the square root of, must be >= 0.
- Returns:
- The square root of the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 79 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgSqrt | ( | const OSG::Real64 | rValue | ) | [inline] |
Return the square root of the argument, i.e. the number y that satisfies y2 == rValue. The argument must be nonnegative.
- Parameters:
-
[in] rValue The number to compute the square root of, must be >= 0.
- Returns:
- The square root of the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 93 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgSqrt | ( | const OSG::Real128 | rValue | ) | [inline] |
Return the square root of the argument, i.e. the number y that satisfies y2 == rValue. The argument must be nonnegative.
- Parameters:
-
[in] rValue The number to compute the square root of, must be >= 0.
- Returns:
- The square root of the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 105 of file OSGBaseFunctions.inl.
| OSG::Fixed32 OSG::osgSqrt | ( | const OSG::Fixed32 | rValue | ) | [inline] |
Return the square root of the argument, i.e. the number y that satisfies y2 == rValue. The argument must be nonnegative.
- Parameters:
-
[in] rValue The number to compute the square root of, must be >= 0.
- Returns:
- The square root of the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 118 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgSqrt | ( | const FloatTypeT | rValue | ) | [inline] |
Return the square root of the argument, i.e. the number y that satisfies y2 == rValue. The argument must be nonnegative.
- Parameters:
-
[in] rValue The number to compute the square root of, must be >= 0.
- Returns:
- The square root of the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 128 of file OSGBaseFunctions.inl.
Referenced by OSG::ShaderShadowMapEngine::calcPointLightRange(), OSG::TrapezoidalShadowMapEngine::calcTrapezoidalTransform(), OSG::Point< ValueTypeT, SizeI >::dist(), OSG::TransformationMatrix< ValueTypeT >::factor(), OSG::FishEyeProjector::flattenVertex(), OSG::Surface::getDesiredError(), OSG::FishEyeProjector::initBottomMesh(), OSG::GroupMCastConnection::initialize(), OSG::FishEyeProjector::initLeftMesh(), OSG::FishEyeProjector::initRightMesh(), OSG::FishEyeProjector::initTopMesh(), OSG::Line::intersect(), OSG::TransformationMatrix< ValueTypeT >::jacobi(), OSG::Vector< ValueTypeT, SizeI >::length(), OSG::QuaternionBase< ValueTypeT >::length(), OSG::TransformationMatrix< ValueTypeT >::norm2(), OSG::TransformationMatrix< ValueTypeT >::polarDecompose(), OSG::FrustumVolume::setPlanes(), OSG::QuaternionBase< ValueTypeT >::setValue(), OSG::QuaternionBase< ValueTypeT >::setValueAsAxisRad(), OSG::TransformationMatrix< ValueTypeT >::spectralDecompose(), OSG::TileGeometryLoad::TileGeometryLoad(), and OSG::TileGeometryLoad::updateGeometry().
00129 { 00130 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 00131 00132 return osgSqrt(RealType(rValue)); 00133 }
| OSG::Real32 OSG::osgCos | ( | const OSG::Real32 | rValue | ) | [inline] |
Return the cosine of the argument, which is given in radians.
- Parameters:
-
[in] rValue The angle in radians to compute the cosine of.
- Returns:
- Cosine of rValue, it is in the range -1 to 1.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 220 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgCos | ( | const OSG::Real64 | rValue | ) | [inline] |
Return the cosine of the argument, which is given in radians.
- Parameters:
-
[in] rValue The angle in radians to compute the cosine of.
- Returns:
- Cosine of rValue, it is in the range -1 to 1.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 234 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgCos | ( | const OSG::Real128 | rValue | ) | [inline] |
Return the cosine of the argument, which is given in radians.
- Parameters:
-
[in] rValue The angle in radians to compute the cosine of.
- Returns:
- Cosine of rValue, it is in the range -1 to 1.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 246 of file OSGBaseFunctions.inl.
| OSG::Fixed32 OSG::osgCos | ( | const OSG::Fixed32 | rValue | ) | [inline] |
Return the cosine of the argument, which is given in radians.
- Parameters:
-
[in] rValue The angle in radians to compute the cosine of.
- Returns:
- Cosine of rValue, it is in the range -1 to 1.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 258 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgCos | ( | const FloatTypeT | rValue | ) | [inline] |
Return the cosine of the argument, which is given in radians.
- Parameters:
-
[in] rValue The angle in radians to compute the cosine of.
- Returns:
- Cosine of rValue, it is in the range -1 to 1.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 268 of file OSGBaseFunctions.inl.
Referenced by OSG::SkyBackground::clear(), OSG::FishEyeProjector::flattenVertex(), OSG::quatFromEul(), OSG::QuaternionBase< ValueTypeT >::setValue(), and OSG::QuaternionBase< ValueTypeT >::setValueAsAxisRad().
00269 { 00270 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 00271 00272 return osgCos(RealType(rValue)); 00273 }
| OSG::Real32 OSG::osgSin | ( | const OSG::Real32 | rValue | ) | [inline] |
Return the sine of the argument, which is given in radians.
- Parameters:
-
[in] rValue The angle in radians to compute the sine of.
- Returns:
- Sine of rValue, it is in the range -1 to 1.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 359 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgSin | ( | const OSG::Real64 | rValue | ) | [inline] |
Return the sine of the argument, which is given in radians.
- Parameters:
-
[in] rValue The angle in radians to compute the sine of.
- Returns:
- Sine of rValue, it is in the range -1 to 1.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 373 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgSin | ( | const OSG::Real128 | rValue | ) | [inline] |
Return the sine of the argument, which is given in radians.
- Parameters:
-
[in] rValue The angle in radians to compute the sine of.
- Returns:
- Sine of rValue, it is in the range -1 to 1.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 385 of file OSGBaseFunctions.inl.
| OSG::Fixed32 OSG::osgSin | ( | const OSG::Fixed32 | rValue | ) | [inline] |
Return the sine of the argument, which is given in radians.
- Parameters:
-
[in] rValue The angle in radians to compute the sine of.
- Returns:
- Sine of rValue, it is in the range -1 to 1.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 397 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgSin | ( | const FloatTypeT | rValue | ) | [inline] |
Return the sine of the argument, which is given in radians.
- Parameters:
-
[in] rValue The angle in radians to compute the sine of.
- Returns:
- Sine of rValue, it is in the range -1 to 1.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 407 of file OSGBaseFunctions.inl.
Referenced by OSG::SkyBackground::clear(), OSG::FishEyeProjector::flattenVertex(), OSG::quatFromEul(), OSG::QuaternionBase< ValueTypeT >::setValue(), OSG::QuaternionBase< ValueTypeT >::setValueAsAxisRad(), and OSG::QuaternionBase< ValueTypeT >::slerp().
00408 { 00409 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 00410 00411 return osgSin(RealType(rValue)); 00412 }
| OSG::Real32 OSG::osgTan | ( | const OSG::Real32 | rValue | ) | [inline] |
Return the tangent of the argument, which is given in radians. The tangent is defined as tan(x) = sin(x) / cos(x) and therefore has singularities at odd multiples of pi/2.
- Parameters:
-
[in] rValue The angle in radians to compute the tangent of.
- Returns:
- Tangent of rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 500 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgTan | ( | const OSG::Real64 | rValue | ) | [inline] |
Return the tangent of the argument, which is given in radians. The tangent is defined as tan(x) = sin(x) / cos(x) and therefore has singularities at odd multiples of pi/2.
- Parameters:
-
[in] rValue The angle in radians to compute the tangent of.
- Returns:
- Tangent of rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 514 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgTan | ( | const OSG::Real128 | rValue | ) | [inline] |
Return the tangent of the argument, which is given in radians. The tangent is defined as tan(x) = sin(x) / cos(x) and therefore has singularities at odd multiples of pi/2.
- Parameters:
-
[in] rValue The angle in radians to compute the tangent of.
- Returns:
- Tangent of rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 526 of file OSGBaseFunctions.inl.
| OSG::Fixed32 OSG::osgTan | ( | const OSG::Fixed32 | rValue | ) | [inline] |
Return the tangent of the argument, which is given in radians. The tangent is defined as tan(x) = sin(x) / cos(x) and therefore has singularities at odd multiples of pi/2.
- Parameters:
-
[in] rValue The angle in radians to compute the tangent of.
- Returns:
- Tangent of rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 538 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgTan | ( | const FloatTypeT | rValue | ) | [inline] |
Return the tangent of the argument, which is given in radians. The tangent is defined as tan(x) = sin(x) / cos(x) and therefore has singularities at odd multiples of pi/2.
- Parameters:
-
[in] rValue The angle in radians to compute the tangent of.
- Returns:
- Tangent of rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 548 of file OSGBaseFunctions.inl.
Referenced by OSG::TrapezoidalShadowMapEngine::calcTrapezoidalTransform(), OSG::OffCenterPerspectiveCamera::getProjection(), OSG::PerspectiveCamera::getProjection(), OSG::BalancedMultiWindow::preloadCache(), and OSG::SimpleSceneManager::showAll().
00549 { 00550 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 00551 00552 return osgTan(RealType(rValue)); 00553 }
| OSG::Real32 OSG::osgACos | ( | const OSG::Real32 | rValue | ) | [inline] |
Return the arc cosine (in radians) of the argument, i.e. the number y such that rValue == cos(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc cosine of, must be in the range [-1; 1].
- Returns:
- The arc cosine of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 643 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgACos | ( | const OSG::Real64 | rValue | ) | [inline] |
Return the arc cosine (in radians) of the argument, i.e. the number y such that rValue == cos(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc cosine of, must be in the range [-1; 1].
- Returns:
- The arc cosine of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 657 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgACos | ( | const OSG::Real128 | rValue | ) | [inline] |
Return the arc cosine (in radians) of the argument, i.e. the number y such that rValue == cos(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc cosine of, must be in the range [-1; 1].
- Returns:
- The arc cosine of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 669 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgACos | ( | const FloatTypeT | rValue | ) | [inline] |
Return the arc cosine (in radians) of the argument, i.e. the number y such that rValue == cos(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc cosine of, must be in the range [-1; 1].
- Returns:
- The arc cosine of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 683 of file OSGBaseFunctions.inl.
Referenced by OSG::addPoint(), OSG::TrapezoidalShadowMapEngine::calcTrapezoidalTransform(), OSG::Vector< ValueTypeT, SizeI >::enclosedAngle(), OSG::TextVectorGlyph::getNormals(), OSG::QuaternionBase< ValueTypeT >::getValueAsAxisDeg(), and OSG::QuaternionBase< ValueTypeT >::slerp().
00684 { 00685 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 00686 00687 return osgACos(RealType(rValue)); 00688 }
| OSG::Real32 OSG::osgASin | ( | const OSG::Real32 | rValue | ) | [inline] |
Return the arc sine (in radians) of the argument, i.e. the number y such that rValue == sin(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc sine of, must be in the range [-1; 1].
- Returns:
- The arc sine of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 770 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgASin | ( | const OSG::Real64 | rValue | ) | [inline] |
Return the arc sine (in radians) of the argument, i.e. the number y such that rValue == sin(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc sine of, must be in the range [-1; 1].
- Returns:
- The arc sine of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 785 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgASin | ( | const OSG::Real128 | rValue | ) | [inline] |
Return the arc sine (in radians) of the argument, i.e. the number y such that rValue == sin(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc sine of, must be in the range [-1; 1].
- Returns:
- The arc sine of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 797 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgASin | ( | const FloatTypeT | rValue | ) | [inline] |
Return the arc sine (in radians) of the argument, i.e. the number y such that rValue == sin(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc sine of, must be in the range [-1; 1].
- Returns:
- The arc sine of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 811 of file OSGBaseFunctions.inl.
Referenced by OSG::TrackballEngine::rotate(), and OSG::Trackball::updateRotation().
00812 { 00813 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 00814 00815 return osgASin(RealType(rValue)); 00816 }
| OSG::Real32 OSG::osgATan | ( | const OSG::Real32 | rValue | ) | [inline] |
Return the arc tangent (in radians) of the argument, i.e. the number y such that rValue == tan(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc tangent of.
- Returns:
- The arc tangent of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 900 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgATan | ( | const OSG::Real64 | rValue | ) | [inline] |
Return the arc tangent (in radians) of the argument, i.e. the number y such that rValue == tan(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc tangent of.
- Returns:
- The arc tangent of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 914 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgATan | ( | const OSG::Real128 | rValue | ) | [inline] |
Return the arc tangent (in radians) of the argument, i.e. the number y such that rValue == tan(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc tangent of.
- Returns:
- The arc tangent of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 926 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgATan | ( | const FloatTypeT | rValue | ) | [inline] |
Return the arc tangent (in radians) of the argument, i.e. the number y such that rValue == tan(y) and y is in the range [-pi/2; pi/2].
- Parameters:
-
[in] rValue The number to compute the arc tangent of.
- Returns:
- The arc tangent of rValue in the range [-pi/2; pi/2].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 940 of file OSGBaseFunctions.inl.
Referenced by OSG::SimplePolygon::getAngle().
00941 { 00942 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 00943 00944 return osgATan(RealType(rValue)); 00945 }
| OSG::Real32 OSG::osgATan2 | ( | const OSG::Real32 | rValue1, | |
| const OSG::Real32 | rValue2 | |||
| ) | [inline] |
Return the arc tangent (in radians) of rValue1 / rValue2 using the signs of both arguments to determine the quadrant. This can be used to obtain the angle component of the polar coordinates of a point with cartesian coordinates (rValue2, rValue1).
- Parameters:
-
[in] rValue1 The numerator of the value to compute atan of. [in] rValue2 The denominator of the value to compute atan of.
- Returns:
- The arc tangent of
rValue1 / rValue2in the range [-pi; pi].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1032 of file OSGBaseFunctions.inl.
01033 { 01034 #ifdef OSG_USE_STDMATH 01035 return std::atan2(rValue1, rValue2); 01036 #elif defined(OSG_HAS_FLOATMATH) 01037 #ifndef _OSG_HAS_ATANF2__ 01038 return atan2f(rValue1, rValue2); 01039 #else 01040 return static_cast<Real32>(atan2(static_cast<Real32>(rValue1), 01041 static_cast<Real32>(rValue2) )); 01042 #endif 01043 #else 01044 return static_cast<Real32>(atan2(static_cast<Real32>(rValue1), 01045 static_cast<Real32>(rValue2) )); 01046 #endif 01047 }
| OSG::Real64 OSG::osgATan2 | ( | const OSG::Real64 | rValue1, | |
| const OSG::Real64 | rValue2 | |||
| ) | [inline] |
Return the arc tangent (in radians) of rValue1 / rValue2 using the signs of both arguments to determine the quadrant. This can be used to obtain the angle component of the polar coordinates of a point with cartesian coordinates (rValue2, rValue1).
- Parameters:
-
[in] rValue1 The numerator of the value to compute atan of. [in] rValue2 The denominator of the value to compute atan of.
- Returns:
- The arc tangent of
rValue1 / rValue2in the range [-pi; pi].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1052 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgATan2 | ( | const OSG::Real128 | rValue1, | |
| const OSG::Real128 | rValue2 | |||
| ) | [inline] |
Return the arc tangent (in radians) of rValue1 / rValue2 using the signs of both arguments to determine the quadrant. This can be used to obtain the angle component of the polar coordinates of a point with cartesian coordinates (rValue2, rValue1).
- Parameters:
-
[in] rValue1 The numerator of the value to compute atan of. [in] rValue2 The denominator of the value to compute atan of.
- Returns:
- The arc tangent of
rValue1 / rValue2in the range [-pi; pi].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1064 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgATan2 | ( | const FloatTypeT | rValue1, | |
| const FloatTypeT | rValue2 | |||
| ) | [inline] |
Return the arc tangent (in radians) of rValue1 / rValue2 using the signs of both arguments to determine the quadrant. This can be used to obtain the angle component of the polar coordinates of a point with cartesian coordinates (rValue2, rValue1).
- Parameters:
-
[in] rValue1 The numerator of the value to compute atan of. [in] rValue2 The denominator of the value to compute atan of.
- Returns:
- The arc tangent of
rValue1 / rValue2in the range [-pi; pi].
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1078 of file OSGBaseFunctions.inl.
Referenced by OSG::calcTexS().
01080 { 01081 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 01082 01083 return osgATan2(RealType(rValue1), RealType(rValue2)); 01084 }
| OSG::Real32 OSG::osgAbs | ( | const OSG::Real32 | rValue | ) | [inline] |
Return the absolute value of the argument.
- Parameters:
-
[in] rValue Number to compute absolute value of.
- Returns:
- Absolute value of rValue.
- Note:
- For floating point arguments this function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1166 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgAbs | ( | const OSG::Real64 | rValue | ) | [inline] |
Return the absolute value of the argument.
- Parameters:
-
[in] rValue Number to compute absolute value of.
- Returns:
- Absolute value of rValue.
- Note:
- For floating point arguments this function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1180 of file OSGBaseFunctions.inl.
| OSG::Fixed32 OSG::osgAbs | ( | const OSG::Fixed32 | rValue | ) | [inline] |
Return the absolute value of the argument.
- Parameters:
-
[in] rValue Number to compute absolute value of.
- Returns:
- Absolute value of rValue.
- Note:
- For floating point arguments this function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1192 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgAbs | ( | const OSG::Real128 | rValue | ) | [inline] |
Return the absolute value of the argument.
- Parameters:
-
[in] rValue Number to compute absolute value of.
- Returns:
- Absolute value of rValue.
- Note:
- For floating point arguments this function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1200 of file OSGBaseFunctions.inl.
| TypeT OSG::osgAbs | ( | const TypeT | rValue | ) | [inline] |
Return the absolute value of the argument.
- Parameters:
-
[in] rValue Number to compute absolute value of.
- Returns:
- Absolute value of rValue.
- Note:
- For floating point arguments this function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1213 of file OSGBaseFunctions.inl.
| OSG::Real32 OSG::osgPow | ( | const OSG::Real32 | rValue, | |
| const OSG::Real32 | rExp | |||
| ) | [inline] |
Return rValue to the power of rExp.
- Parameters:
-
[in] rValue Base. [in] rExp Exponent.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1303 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgPow | ( | const OSG::Real64 | rValue, | |
| const OSG::Real64 | rExp | |||
| ) | [inline] |
Return rValue to the power of rExp.
- Parameters:
-
[in] rValue Base. [in] rExp Exponent.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1318 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgPow | ( | const OSG::Real128 | rValue, | |
| const OSG::Real128 | rExp | |||
| ) | [inline] |
Return rValue to the power of rExp.
- Parameters:
-
[in] rValue Base. [in] rExp Exponent.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1330 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgPow | ( | const FloatTypeT | rValue, | |
| const FloatTypeT | rExp | |||
| ) | [inline] |
Return rValue to the power of rExp.
- Parameters:
-
[in] rValue Base. [in] rExp Exponent.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1344 of file OSGBaseFunctions.inl.
Referenced by OSG::TrackballEngine::moveTo(), OSG::TransformationMatrix< ValueTypeT >::sqrt(), and OSG::TransformationMatrix< ValueTypeT >::sqrtOf().
01346 { 01347 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 01348 01349 return osgPow(RealType(rValue), RealType(rExp)); 01350 }
| OSG::Real32 OSG::osgLog | ( | const OSG::Real32 | rValue | ) | [inline] |
Return the natural logarithm of the argument, i.e. the number y such that ey == rValue, where e is Euler's number.
- Parameters:
-
[in] rValue The number to compute the natural logarithm of, must be >= 0.
- Returns:
- Natural logarithm of rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1431 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgLog | ( | const OSG::Real64 | rValue | ) | [inline] |
Return the natural logarithm of the argument, i.e. the number y such that ey == rValue, where e is Euler's number.
- Parameters:
-
[in] rValue The number to compute the natural logarithm of, must be >= 0.
- Returns:
- Natural logarithm of rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1445 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgLog | ( | const OSG::Real128 | rValue | ) | [inline] |
Return the natural logarithm of the argument, i.e. the number y such that ey == rValue, where e is Euler's number.
- Parameters:
-
[in] rValue The number to compute the natural logarithm of, must be >= 0.
- Returns:
- Natural logarithm of rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1457 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgLog | ( | const FloatTypeT | rValue | ) | [inline] |
Return the natural logarithm of the argument, i.e. the number y such that ey == rValue, where e is Euler's number.
- Parameters:
-
[in] rValue The number to compute the natural logarithm of, must be >= 0.
- Returns:
- Natural logarithm of rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1471 of file OSGBaseFunctions.inl.
Referenced by OSG::QuadTreeTerrain::changed(), OSG::TransformationMatrix< ValueTypeT >::exp(), OSG::TransformationMatrix< ValueTypeT >::expOf(), OSG::SceneFileType::print(), OSG::Log::setHeaderElem(), OSG::Log::setLogFile(), OSG::Log::setLogLevel(), and OSG::Log::setLogType().
01472 { 01473 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 01474 01475 return osgLog(RealType(rValue)); 01476 }
| OSG::Real32 OSG::osgExp | ( | const OSG::Real32 | rValue | ) | [inline] |
Return e to the power rValue, where e is Euler's number, the base of the natural logarithm.
- Parameters:
-
[in] rValue Exponent.
- Returns:
- e to the power rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1557 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgExp | ( | const OSG::Real64 | rValue | ) | [inline] |
Return e to the power rValue, where e is Euler's number, the base of the natural logarithm.
- Parameters:
-
[in] rValue Exponent.
- Returns:
- e to the power rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1571 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgExp | ( | const OSG::Real128 | rValue | ) | [inline] |
Return e to the power rValue, where e is Euler's number, the base of the natural logarithm.
- Parameters:
-
[in] rValue Exponent.
- Returns:
- e to the power rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1583 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgExp | ( | const FloatTypeT | rValue | ) | [inline] |
Return e to the power rValue, where e is Euler's number, the base of the natural logarithm.
- Parameters:
-
[in] rValue Exponent.
- Returns:
- e to the power rValue.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1597 of file OSGBaseFunctions.inl.
01598 { 01599 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 01600 01601 return osgExp(RealType(rValue)); 01602 }
| OSG::Real32 OSG::osgFloor | ( | const OSG::Real32 | rValue | ) | [inline] |
Returns the argument rounded downwards to the nearest integer, i.e. returns the largest integer not greater than rValue.
Example:
- Parameters:
-
[in] rValue Number to round down.
- Returns:
- Largest integer not greater than the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1688 of file OSGBaseFunctions.inl.
01689 { 01690 #ifdef OSG_USE_STDMATH 01691 return std::floor(rValue); 01692 #elif defined(OSG_HAS_FLOATMATH) 01693 # ifdef OSG_HPUX_ACC 01694 return static_cast<Real32>(floor(static_cast<Real32>(rValue))); 01695 # else 01696 return floorf(rValue); 01697 # endif 01698 #else 01699 return static_cast<Real32>(floor(static_cast<Real32>(rValue))); 01700 #endif 01701 }
| OSG::Real64 OSG::osgFloor | ( | const OSG::Real64 | rValue | ) | [inline] |
Returns the argument rounded downwards to the nearest integer, i.e. returns the largest integer not greater than rValue.
Example:
- Parameters:
-
[in] rValue Number to round down.
- Returns:
- Largest integer not greater than the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1706 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgFloor | ( | const OSG::Real128 | rValue | ) | [inline] |
Returns the argument rounded downwards to the nearest integer, i.e. returns the largest integer not greater than rValue.
Example:
- Parameters:
-
[in] rValue Number to round down.
- Returns:
- Largest integer not greater than the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1718 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgFloor | ( | const FloatTypeT | rValue | ) | [inline] |
Returns the argument rounded downwards to the nearest integer, i.e. returns the largest integer not greater than rValue.
Example:
- Parameters:
-
[in] rValue Number to round down.
- Returns:
- Largest integer not greater than the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1732 of file OSGBaseFunctions.inl.
01733 { 01734 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 01735 01736 return osgFloor(RealType(rValue)); 01737 }
| OSG::Real32 OSG::osgCeil | ( | const OSG::Real32 | rValue | ) | [inline] |
Returns the argument rounded upwards to the nearest integer, i.e. returns the smallest integer not less than rValue.
Example:
- Parameters:
-
[in] rValue Number to round up.
- Returns:
- Smallest integer not less than the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1829 of file OSGBaseFunctions.inl.
01830 { 01831 #ifdef OSG_USE_STDMATH 01832 return std::ceil(rValue); 01833 #elif defined(OSG_HAS_FLOATMATH) 01834 # ifdef OSG_HPUX_ACC 01835 return static_cast<Real32>(ceil(static_cast<Real32>(rValue))); 01836 # else 01837 return ceilf(rValue); 01838 # endif 01839 #else 01840 return static_cast<Real32>(ceil(static_cast<Real32>(rValue))); 01841 #endif 01842 }
| OSG::Real64 OSG::osgCeil | ( | const OSG::Real64 | rValue | ) | [inline] |
Returns the argument rounded upwards to the nearest integer, i.e. returns the smallest integer not less than rValue.
Example:
- Parameters:
-
[in] rValue Number to round up.
- Returns:
- Smallest integer not less than the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1847 of file OSGBaseFunctions.inl.
| OSG::Real128 OSG::osgCeil | ( | const OSG::Real128 | rValue | ) | [inline] |
Returns the argument rounded upwards to the nearest integer, i.e. returns the smallest integer not less than rValue.
Example:
- Parameters:
-
[in] rValue Number to round up.
- Returns:
- Smallest integer not less than the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1859 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgCeil | ( | const FloatTypeT | rValue | ) | [inline] |
Returns the argument rounded upwards to the nearest integer, i.e. returns the smallest integer not less than rValue.
Example:
- Parameters:
-
[in] rValue Number to round up.
- Returns:
- Smallest integer not less than the argument.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1873 of file OSGBaseFunctions.inl.
Referenced by OSG::OcclusionCullingTreeBuilder::add(), and OSG::TextPixmapFace::makeImage().
01874 { 01875 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 01876 01877 return OSG::osgCeil(RealType(rValue)); 01878 }
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgMod | ( | const FloatTypeT | lValue, | |
| const FloatTypeT | rValue | |||
| ) | [inline] |
- Parameters:
-
[in] lValue [in] rValue
- Returns:
- lValue % rValue
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1951 of file OSGBaseFunctions.inl.
01952 { 01953 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 01954 01955 return OSG::osgMod(RealType(lValue), RealType(rValue)); 01956 }
| OSG::Real32 OSG::osgMod | ( | const OSG::Real32 | lValue, | |
| const OSG::Real32 | rValue | |||
| ) | [inline] |
- Parameters:
-
[in] lValue [in] rValue
- Returns:
- lValue % rValue
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1961 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgMod | ( | const OSG::Real64 | lValue, | |
| const OSG::Real64 | rValue | |||
| ) | [inline] |
- Parameters:
-
[in] lValue [in] rValue
- Returns:
- lValue % rValue
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1973 of file OSGBaseFunctions.inl.
| OSG::UInt32 OSG::osgFinite | ( | const FloatTypeT | rValue | ) | [inline] |
Returns a nonzero value if rValue is a finite number, i.e. neither plus or minus infinity nor NAN.
- Parameters:
-
[in] rValue Number to test.
- Returns:
- Nonzero value if argument is finite.
- Note:
- This function forwards to an appropriate C++ or C library function, hence exhibits the respective error behavior.
Definition at line 1999 of file OSGBaseFunctions.inl.
Referenced by OSG::QuaternionBase< ValueTypeT >::setValueAsAxisDeg(), and OSG::QuaternionBase< ValueTypeT >::setValueAsAxisRad().
| TypeT OSG::osgMin | ( | const TypeT | lValue, | |
| const TypeT | rValue | |||
| ) | [inline] |
Return the smaller of the two arguments.
- Parameters:
-
[in] lValue First value for comparison. [in] rValue Second value for comparison.
- Returns:
- The smaller of the two arguments.
Definition at line 2051 of file OSGBaseFunctions.inl.
Referenced by OSG::State::activate(), OSG::DrawEnv::activate(), OSG::OcclusionCullingTreeBuilder::add(), OSG::BalancedMultiWindow::balanceServer(), OSG::QuadTreeTerrain::calcBlend(), OSG::ShaderShadowMapEngine::calcPointLightRange(), OSG::BalancedMultiWindow::calculateServerPort(), OSG::QuadTreeTerrain::changed(), OSG::State::changeFrom(), OSG::DrawEnv::changeTo(), OSG::TextureGrabBackground::clear(), OSG::CErrorQuadTree::ComputeError(), OSG::VarianceShadowMapHandler::configureShadowMaps(), OSG::State::deactivate(), OSG::DrawEnv::deactivate(), OSG::deepClone(), OSG::TiledQuadTreeTerrain::doRenderEnter(), OSG::TextureGrabForeground::draw(), OSG::GrabForeground::draw(), OSG::ExceptionBinaryDataHandler::get(), OSG::FrustumVolume::getBounds(), OSG::ParSpaceTrimmer::getContinuingFace(), OSG::NestedPerfTracker::getFrameRate(), OSG::QuadTreeTerrain::getHeight(), OSG::TileGeometryLoad::getVisibleArea(), OSG::BalancedMultiWindow::getVisibleLoad(), OSG::ShaderShadowMapEngine::handleDirectionalLightEnter(), OSG::GroupMCastConnection::initialize(), OSG::VarianceShadowMapHandler::initShadowMaps(), OSG::BezierCurve2D::minMaxIntersection(), OSG::ParSpaceTrimmer::PerformTrimming2(), OSG::ExceptionBinaryDataHandler::put(), OSG::PointMCastConnection::read(), OSG::TGAImageFileType::read(), OSG::DBBlockAccessor::readBlockA16(), OSG::GDALBlockAccessor::readBlockA16(), OSG::PipelineComposer::readBuffer(), OSG::ExceptionBinaryDataHandler::readBuffer(), OSG::PointMCastConnection::readBuffer(), OSG::ScreenLOD::renderEnter(), OSG::DeferredShadingStage::scheduleGBufferPass(), OSG::ClusterViewBuffer::send(), OSG::MultiDisplayWindow::serverRender(), OSG::Image::setSubData(), OSG::BinarySwapComposer::startReader(), OSG::BalancedMultiWindow::storeViewport(), OSG::Image::subImage(), OSG::DrawEnv::update(), OSG::TileGeometryLoad::updateGeometry(), OSG::DeferredShadingStage::updateStageData(), OSG::MultiDisplayWindow::updateViewport(), and OSG::GroupMCastConnection::write().
| TypeT OSG::osgMax | ( | const TypeT | lValue, | |
| const TypeT | rValue | |||
| ) | [inline] |
Return the larger of the two arguments.
- Parameters:
-
[in] lValue First value for comparison. [in] rValue Second value for comparison.
- Returns:
- The larger of the two arguments.
Definition at line 2065 of file OSGBaseFunctions.inl.
Referenced by OSG::OcclusionCullingTreeBuilder::add(), OSG::QuadTreeTerrain::calcD2Value(), OSG::Image::calcMipmapGeometry(), OSG::QuadTreeTerrain::calcSubDiv(), OSG::BalancedMultiWindow::calculateServerPort(), OSG::QuadTreeTerrain::changed(), OSG::VerifyGeoGraphOp::checkIndexedGeo(), OSG::CErrorQuadTree::ComputeError(), OSG::createComposedImage(), OSG::BezierCurve3D::createCurve(), OSG::ParticleBSPTree::doBuild(), OSG::Log::doLog(), OSG::TiledQuadTreeTerrain::doRenderEnter(), OSG::GrabForeground::draw(), OSG::RenderNode::estimatePerformance(), OSG::TileLoadBalancer::findBestCut(), OSG::FrustumVolume::getBounds(), OSG::ParSpaceTrimmer::getContinuingFace(), OSG::TileGeometryLoad::getVisibleArea(), OSG::BalancedMultiWindow::getVisibleLoad(), OSG::GroupMCastConnection::GroupMCastConnection(), OSG::ShaderShadowMapEngine::handleDirectionalLightEnter(), OSG::BezierCurve2D::minMaxIntersection(), OSG::ParSpaceTrimmer::PerformTrimming(), OSG::ParSpaceTrimmer::PerformTrimming2(), OSG::BalancedMultiWindow::preloadCache(), OSG::QuadTreeTerrain::propagateD2Errors(), OSG::CSMSceneParameter::reset(), OSG::PrimitiveIterator::seek(), OSG::MultiDisplayWindow::serverRender(), OSG::Image::setSubData(), OSG::SimpleSceneManager::showAll(), OSG::BalancedMultiWindow::splitAxis(), OSG::BalancedMultiWindow::splitViewport(), OSG::TileGeometryLoad::updateGeometry(), and OSG::ShadowStage::updateLights().
| TypeT OSG::osgClamp | ( | const TypeT | minVal, | |
| const TypeT | val, | |||
| const TypeT | maxVal | |||
| ) | [inline] |
Restrict val to the range [minVal; maxVal], inclusive.
- Parameters:
-
[in] minVal Lower bound of the range. [in] val Value to clamp. [in] maxVal Upper bound of the range.
- Returns:
- The value from the given range that is closest to val.
Definition at line 2080 of file OSGBaseFunctions.inl.
References OSG_ASSERT.
Referenced by OSG::OcclusionCullingTreeBuilder::add(), OSG::TextureObjChunk::handleTexture(), OSG::ScreenLOD::renderEnter(), OSG::TrackballEngine::rotate(), and OSG::OcclusionCullingTreeBuilder::testNode().
02081 { 02082 OSG_ASSERT(minVal < maxVal); 02083 02084 return ((val > minVal) ? ((val < maxVal) ? val : maxVal) : minVal); 02085 }
| Int8 OSG::osgSgn | ( | TypeT | val | ) | [inline] |
Return the sign of the argument, i.e. -1 if val is negative, 1 if it is positive and 0 otherwise.
- Parameters:
-
[in] val The number to classify.
- Returns:
- The sign of the argument.
Definition at line 2112 of file OSGBaseFunctions.inl.
Referenced by OSG::TrapezoidalShadowMapEngine::calcTrapezoidalTransform(), and OSG::TrackballEngine::moveTo().
| void OSG::osgSwap | ( | TypeT & | lValue, | |
| TypeT & | rValue | |||
| ) | [inline] |
Exchanges the values of the arguments.
- Parameters:
-
[in,out] lValue New value for rValue, is assigned the old value of rValue. [in,out] rValue New value for lVal, is assigned the old value of rVal.
- Note:
- It is usually better to use std::swap instead, as it often has special handling for standard library types.
Definition at line 2141 of file OSGBaseFunctions.inl.
| OSG::Real32 OSG::osgDegree2Rad | ( | const OSG::Real32 | rValue | ) | [inline] |
Converts the argument angle from degrees to radians.
- Parameters:
-
[in] rValue Angle in degree to convert.
- Returns:
- Angle in radians.
Definition at line 2162 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgDegree2Rad | ( | const OSG::Real64 | rValue | ) | [inline] |
Converts the argument angle from degrees to radians.
- Parameters:
-
[in] rValue Angle in degree to convert.
- Returns:
- Angle in radians.
Definition at line 2170 of file OSGBaseFunctions.inl.
| OSG::Fixed32 OSG::osgDegree2Rad | ( | const OSG::Fixed32 | rValue | ) | [inline] |
Converts the argument angle from degrees to radians.
- Parameters:
-
[in] rValue Angle in degree to convert.
- Returns:
- Angle in radians.
Definition at line 2178 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgDegree2Rad | ( | const FloatTypeT | rValue | ) | [inline] |
Converts the argument angle from degrees to radians.
- Parameters:
-
[in] rValue Angle in degree to convert.
- Returns:
- Angle in radians.
Definition at line 2188 of file OSGBaseFunctions.inl.
Referenced by OSG::CSMPerspectiveCamera::changed(), OSG::FishEyeProjector::flattenVertex(), OSG::OffCenterPerspectiveCamera::getProjection(), OSG::PerspectiveCamera::getProjection(), OSG::QuaternionBase< ValueTypeT >::getValueAsAxisRad(), OSG::SimpleSceneManager::initialize(), OSG::Manipulator::onCreate(), OSG::BalancedMultiWindow::preloadCache(), OSG::SpotLight::setSpotCutOffDeg(), OSG::CubeMapGenerator::setupStageData(), OSG::FishEyeProjector::setupStageData(), OSG::QuaternionBase< ValueTypeT >::setValueAsAxisDeg(), and OSG::ShadowStage::updateLights().
02189 { 02190 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 02191 02192 return OSG::osgDegree2Rad(RealType(rValue)); 02193 }
| OSG::Real32 OSG::osgRad2Degree | ( | const OSG::Real32 | rValue | ) | [inline] |
Converts the argument angle from radians to degrees.
- Parameters:
-
[in] rValue Angle in radians to convert.
- Returns:
- Angle in degrees.
Definition at line 2252 of file OSGBaseFunctions.inl.
| OSG::Real64 OSG::osgRad2Degree | ( | const OSG::Real64 | rValue | ) | [inline] |
Converts the argument angle from radians to degrees.
- Parameters:
-
[in] rValue Angle in radians to convert.
- Returns:
- Angle in degrees.
Definition at line 2260 of file OSGBaseFunctions.inl.
| OSG::Fixed32 OSG::osgRad2Degree | ( | const OSG::Fixed32 | rValue | ) | [inline] |
Converts the argument angle from radians to degrees.
- Parameters:
-
[in] rValue Angle in radians to convert.
- Returns:
- Angle in degrees.
Definition at line 2268 of file OSGBaseFunctions.inl.
| TypeTraits< FloatTypeT >::RealReturnType OSG::osgRad2Degree | ( | const FloatTypeT | rValue | ) | [inline] |
Converts the argument angle from radians to degrees.
- Parameters:
-
[in] rValue Angle in radians to convert.
- Returns:
- Angle in degrees.
Definition at line 2277 of file OSGBaseFunctions.inl.
Referenced by OSG::SpotLight::getSpotCutOffDeg(), OSG::QuaternionBase< ValueTypeT >::getValueAsAxisDeg(), OSG::SpotLight::makeChunk(), OSG::DeferredShadingStage::updateLightChunk(), and OSG::ShadowStage::updateLights().
02278 { 02279 typedef typename TypeTraits<FloatTypeT>::RealReturnType RealType; 02280 02281 return OSG::osgRad2Degree(RealType(rValue)); 02282 }
| bool OSG::osgIsPower2< UInt32 > | ( | const OSG::UInt32 | rValue | ) | [inline] |
Test if the argument is a power of 2 or zero.
- Parameters:
-
[in] rValue Number to test.
- Returns:
- true if rValue is a power of 2 or zero, false otherwise.
| OSG::UInt32 OSG::osgNextPower2< UInt32 > | ( | OSG::UInt32 | rValue | ) | [inline] |
Return the next larger power of 2, i.e. the smallest power of 2 not less than rValue.
- Parameters:
-
[in] rValue The lower bound for the wanted power of 2.
- Returns:
- A power of 2 not less than rValue or 0 if there is no such value within rValue type's range.
| OSG::Int32 OSG::osgNextPower2< Int32 > | ( | OSG::Int32 | rValue | ) | [inline] |
Return the next larger power of 2, i.e. the smallest power of 2 not less than rValue.
- Parameters:
-
[in] rValue The lower bound for the wanted power of 2.
- Returns:
- A power of 2 not less than rValue or 0 if there is no such value within rValue type's range.
| OSG::UInt64 OSG::osgNextPower2< UInt64 > | ( | OSG::UInt64 | rValue | ) | [inline] |
Return the next larger power of 2, i.e. the smallest power of 2 not less than rValue.
- Parameters:
-
[in] rValue The lower bound for the wanted power of 2.
- Returns:
- A power of 2 not less than rValue or 0 if there is no such value within rValue type's range.
| OSG::Int64 OSG::osgNextPower2< Int64 > | ( | OSG::Int64 | rValue | ) | [inline] |
Return the next larger power of 2, i.e. the smallest power of 2 not less than rValue.
- Parameters:
-
[in] rValue The lower bound for the wanted power of 2.
- Returns:
- A power of 2 not less than rValue or 0 if there is no such value within rValue type's range.
| bool OSG::osgIsPower2< Int32 > | ( | const OSG::Int32 | rValue | ) | [inline] |
Test if the argument is a power of 2 or zero.
- Parameters:
-
[in] rValue Number to test.
- Returns:
- true if rValue is a power of 2 or zero, false otherwise.
| bool OSG::osgIsPower2< UInt64 > | ( | const OSG::UInt64 | rValue | ) | [inline] |
Test if the argument is a power of 2 or zero.
- Parameters:
-
[in] rValue Number to test.
- Returns:
- true if rValue is a power of 2 or zero, false otherwise.
| bool OSG::osgIsPower2< Int64 > | ( | const OSG::Int64 | rValue | ) | [inline] |
Test if the argument is a power of 2 or zero.
- Parameters:
-
[in] rValue Number to test.
- Returns:
- true if rValue is a power of 2 or zero, false otherwise.
