Reimplemted the osgUtil::SceneView::setCalcNearFar() functionality to bring
it inline with the CullStack/CullVisitor implementation. Also added the setSmallFeatureCullingPixelSize() method and wired them up inside SceneView.cpp so they set the corresponding CullVisitor paramters. Intergrated pfImage copying change in the Performer plugin, submission sent in by Ulrich Hertlein
This commit is contained in:
@@ -41,11 +41,6 @@ class SG_EXPORT CullStack
|
||||
|
||||
typedef unsigned int CullingMode;
|
||||
|
||||
/** Sets the current CullingMode.*/
|
||||
void setCullingMode(CullingMode mode) { _cullingMode = mode; }
|
||||
|
||||
/** Returns the current CullingMode.*/
|
||||
CullingMode getCullingMode() const { return _cullingMode; }
|
||||
|
||||
void reset();
|
||||
|
||||
@@ -65,11 +60,16 @@ class SG_EXPORT CullStack
|
||||
inline float getFrustumVolume() { if (_frustumVolume<0.0f) computeFrustumVolume(); return _frustumVolume; }
|
||||
|
||||
|
||||
/** Sets the current CullingMode.*/
|
||||
void setCullingMode(CullingMode mode) { _cullingMode = mode; }
|
||||
|
||||
/** Returns the current CullingMode.*/
|
||||
CullingMode getCullingMode() const { return _cullingMode; }
|
||||
|
||||
void setLODBias(const float bias) { _LODBias = bias; }
|
||||
const float getLODBias() const { return _LODBias; }
|
||||
|
||||
void setSmallFeatureCullingPixelSize(float value) { _smallFeatureCullingPixelSize=value; }
|
||||
float& getSmallFeatureCullingPixelSize() { return _smallFeatureCullingPixelSize; }
|
||||
float getSmallFeatureCullingPixelSize() const { return _smallFeatureCullingPixelSize; }
|
||||
|
||||
|
||||
|
||||
@@ -88,17 +88,17 @@ inline T square(T v) { return v*v; }
|
||||
template<typename T>
|
||||
inline T signedSquare(T v) { return v<(T)0?-v*v:v*v;; }
|
||||
|
||||
template<typename T>
|
||||
inline T inDegrees(T angle) { return angle*(T)PI/(T)180.0; }
|
||||
inline float inDegrees(float angle) { return angle*(float)PI/180.0f; }
|
||||
inline double inDegrees(double angle) { return angle*PI/180.0; }
|
||||
|
||||
template<typename T>
|
||||
inline T inRadians(T angle) { return angle; }
|
||||
|
||||
template<typename T>
|
||||
inline T DegreesToRadians(T angle) { return angle*(T)PI/(T)180.0; }
|
||||
inline float DegreesToRadians(float angle) { return angle*(float)PI/180.0f; }
|
||||
inline double DegreesToRadians(double angle) { return angle*PI/180.0; }
|
||||
|
||||
template<typename T>
|
||||
inline T RadiansToDegrees(T angle) { return angle*(T)180.0/(T)PI; }
|
||||
inline float RadiansToDegrees(float angle) { return angle*180.0f/(float)PI; }
|
||||
inline double RadiansToDegrees(double angle) { return angle*180.0/PI; }
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MWERKS__)
|
||||
inline bool isNaN(float v) { return _isnan(v)!=0; }
|
||||
|
||||
Reference in New Issue
Block a user