Warning fixes
This commit is contained in:
@@ -158,14 +158,14 @@ class OSG_EXPORT GraphicsContext : public Object
|
||||
ScreenSettings() :
|
||||
width(0),
|
||||
height(0),
|
||||
colorDepth(0),
|
||||
refreshRate(0)
|
||||
refreshRate(0),
|
||||
colorDepth(0)
|
||||
{}
|
||||
ScreenSettings(int width, int height, double refreshRate=0, unsigned int colorDepth=0) :
|
||||
width(width),
|
||||
height(height),
|
||||
colorDepth(colorDepth),
|
||||
refreshRate(refreshRate)
|
||||
refreshRate(refreshRate),
|
||||
colorDepth(colorDepth)
|
||||
{}
|
||||
|
||||
int width;
|
||||
|
||||
@@ -119,6 +119,6 @@ namespace osgAnimation
|
||||
typedef TemplateSampler<Vec3CubicBezierInterpolator> Vec3CubicBezierSampler;
|
||||
typedef TemplateSampler<Vec4CubicBezierInterpolator> Vec4CubicBezierSampler;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace osgIntrospection
|
||||
{
|
||||
public:
|
||||
// Standard constructor.
|
||||
ConstructorInfo(const Type& decltype, const ParameterInfoList& params, std::string briefHelp = std::string(), std::string detailedHelp = std::string())
|
||||
: _decltype(decltype),
|
||||
ConstructorInfo(const Type& declaratiionType, const ParameterInfoList& params, std::string briefHelp = std::string(), std::string detailedHelp = std::string())
|
||||
: _declarationType(declaratiionType),
|
||||
_params(params),
|
||||
_explicit(false),
|
||||
_briefHelp(briefHelp),
|
||||
@@ -37,8 +37,8 @@ namespace osgIntrospection
|
||||
}
|
||||
|
||||
// Constructor allowing explicit state specification.
|
||||
ConstructorInfo(const Type& decltype, const ParameterInfoList& params, bool isExplicit, std::string briefHelp = std::string(), std::string detailedHelp = std::string())
|
||||
: _decltype(decltype),
|
||||
ConstructorInfo(const Type& declaratiionType, const ParameterInfoList& params, bool isExplicit, std::string briefHelp = std::string(), std::string detailedHelp = std::string())
|
||||
: _declarationType(declaratiionType),
|
||||
_params(params),
|
||||
_explicit(isExplicit),
|
||||
_briefHelp(briefHelp),
|
||||
@@ -68,7 +68,7 @@ namespace osgIntrospection
|
||||
/// declares the reflected constructor.
|
||||
inline const Type& getDeclaringType() const
|
||||
{
|
||||
return _decltype;
|
||||
return _declarationType;
|
||||
}
|
||||
|
||||
/// Returns a list of objects that describe the reflected
|
||||
@@ -92,7 +92,7 @@ namespace osgIntrospection
|
||||
virtual void getInheritedProviders(CustomAttributeProviderList& providers) const;
|
||||
|
||||
private:
|
||||
const Type& _decltype;
|
||||
const Type& _declarationType;
|
||||
ParameterInfoList _params;
|
||||
bool _explicit;
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@ namespace osgIntrospection
|
||||
};
|
||||
|
||||
/// Direct initialization constructor.
|
||||
inline MethodInfo(const std::string& qname, const Type& decltype, const Type& rtype, const ParameterInfoList& plist, VirtualState virtualState, std::string briefHelp = std::string(), std::string detailedHelp = std::string());
|
||||
inline MethodInfo(const std::string& qname, const Type& declarationType, const Type& rtype, const ParameterInfoList& plist, VirtualState virtualState, std::string briefHelp = std::string(), std::string detailedHelp = std::string());
|
||||
|
||||
/// Direct initialization constructor for static functions (no virtual specifier).
|
||||
inline MethodInfo(const std::string& qname, const Type& decltype, const Type& rtype, const ParameterInfoList& plist, std::string briefHelp = std::string(), std::string detailedHelp = std::string());
|
||||
inline MethodInfo(const std::string& qname, const Type& declarationType, const Type& rtype, const ParameterInfoList& plist, std::string briefHelp = std::string(), std::string detailedHelp = std::string());
|
||||
|
||||
/// Destructor
|
||||
inline ~MethodInfo();
|
||||
@@ -119,7 +119,7 @@ namespace osgIntrospection
|
||||
virtual void getInheritedProviders(CustomAttributeProviderList& providers) const;
|
||||
|
||||
std::string _name;
|
||||
const Type& _decltype;
|
||||
const Type& _declarationType;
|
||||
const Type& _rtype;
|
||||
ParameterInfoList _params;
|
||||
VirtualState _virtualState;
|
||||
@@ -130,9 +130,9 @@ namespace osgIntrospection
|
||||
|
||||
// INLINE METHODS
|
||||
|
||||
inline MethodInfo::MethodInfo(const std::string& qname, const Type& decltype, const Type& rtype, const ParameterInfoList& plist, VirtualState virtualState, std::string briefHelp, std::string detailedHelp)
|
||||
inline MethodInfo::MethodInfo(const std::string& qname, const Type& declarationType, const Type& rtype, const ParameterInfoList& plist, VirtualState virtualState, std::string briefHelp, std::string detailedHelp)
|
||||
: CustomAttributeProvider(),
|
||||
_decltype(decltype),
|
||||
_declarationType(declarationType),
|
||||
_rtype(rtype),
|
||||
_params(plist),
|
||||
_virtualState(virtualState),
|
||||
@@ -142,9 +142,9 @@ namespace osgIntrospection
|
||||
_name = strip_namespace(qname);
|
||||
}
|
||||
|
||||
inline MethodInfo::MethodInfo(const std::string& qname, const Type& decltype, const Type& rtype, const ParameterInfoList& plist, std::string briefHelp, std::string detailedHelp)
|
||||
inline MethodInfo::MethodInfo(const std::string& qname, const Type& declarationType, const Type& rtype, const ParameterInfoList& plist, std::string briefHelp, std::string detailedHelp)
|
||||
: CustomAttributeProvider(),
|
||||
_decltype(decltype),
|
||||
_declarationType(declarationType),
|
||||
_rtype(rtype),
|
||||
_params(plist),
|
||||
_virtualState(NON_VIRTUAL),
|
||||
@@ -169,7 +169,7 @@ namespace osgIntrospection
|
||||
|
||||
inline const Type& MethodInfo::getDeclaringType() const
|
||||
{
|
||||
return _decltype;
|
||||
return _declarationType;
|
||||
}
|
||||
|
||||
inline const Type& MethodInfo::getReturnType() const
|
||||
|
||||
@@ -56,9 +56,9 @@ namespace osgIntrospection
|
||||
/// be null, meaning a restricted access. If both are null, the
|
||||
/// user is expected to add a custom accessor attribute to this
|
||||
/// PropertyInfo object.
|
||||
PropertyInfo(const Type& decltype, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, std::string briefHelp = std::string(), std::string detailedHelp = std::string())
|
||||
PropertyInfo(const Type& declaratiionType, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, std::string briefHelp = std::string(), std::string detailedHelp = std::string())
|
||||
: CustomAttributeProvider(),
|
||||
_decltype(decltype),
|
||||
_declarationType(declaratiionType),
|
||||
_ptype(ptype),
|
||||
_name(name),
|
||||
_getm(getm),
|
||||
@@ -78,9 +78,9 @@ namespace osgIntrospection
|
||||
/// declares the property, the Type object that describes the
|
||||
/// type of the property's value, the property name and the
|
||||
/// getter/setter/counter/adder/insert/remover methods.
|
||||
PropertyInfo(const Type& decltype, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, const MethodInfo* numm, const MethodInfo* addm, const MethodInfo* insm, const MethodInfo* remm, std::string briefHelp = std::string(), std::string detailedHelp = std::string())
|
||||
PropertyInfo(const Type& declaratiionType, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, const MethodInfo* numm, const MethodInfo* addm, const MethodInfo* insm, const MethodInfo* remm, std::string briefHelp = std::string(), std::string detailedHelp = std::string())
|
||||
: CustomAttributeProvider(),
|
||||
_decltype(decltype),
|
||||
_declarationType(declaratiionType),
|
||||
_ptype(ptype),
|
||||
_name(name),
|
||||
_getm(getm),
|
||||
@@ -105,9 +105,9 @@ namespace osgIntrospection
|
||||
/// If the getter method has parameters, the property is considered
|
||||
/// to be indexed. The same is true if the getter is null and the
|
||||
/// setter has more than one parameter.
|
||||
PropertyInfo(const Type& decltype, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, const MethodInfo* remm, std::string briefHelp = std::string(), std::string detailedHelp = std::string())
|
||||
PropertyInfo(const Type& declaratiionType, const Type& ptype, const std::string& name, const MethodInfo* getm, const MethodInfo* setm, const MethodInfo* remm, std::string briefHelp = std::string(), std::string detailedHelp = std::string())
|
||||
: CustomAttributeProvider(),
|
||||
_decltype(decltype),
|
||||
_declarationType(declaratiionType),
|
||||
_ptype(ptype),
|
||||
_name(name),
|
||||
_getm(getm),
|
||||
@@ -161,7 +161,7 @@ namespace osgIntrospection
|
||||
/// Returns the type that declares the property.
|
||||
inline virtual const Type& getDeclaringType() const
|
||||
{
|
||||
return _decltype;
|
||||
return _declarationType;
|
||||
}
|
||||
|
||||
/// Returns the type of the reflected property.
|
||||
@@ -360,7 +360,7 @@ namespace osgIntrospection
|
||||
virtual void getInheritedProviders(CustomAttributeProviderList& providers) const;
|
||||
|
||||
private:
|
||||
const Type& _decltype;
|
||||
const Type& _declarationType;
|
||||
const Type& _ptype;
|
||||
std::string _name;
|
||||
const MethodInfo* _getm;
|
||||
|
||||
@@ -118,8 +118,8 @@ class OSGSHADOW_EXPORT MinimalDrawBoundsShadowMap
|
||||
}
|
||||
|
||||
protected:
|
||||
osg::ref_ptr< osg::NodeCallback > _nc;
|
||||
osg::observer_ptr< ViewData > _vd;
|
||||
osg::ref_ptr< osg::NodeCallback > _nc;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -285,6 +285,8 @@ void Camera::attach(BufferComponent buffer, GLenum internalFormat)
|
||||
notify(WARN) << "Camera: STENCIL_BUFFER already attached !" << std::endl;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
_bufferAttachmentMap[buffer]._internalFormat = internalFormat;
|
||||
}
|
||||
|
||||
@@ -596,7 +596,8 @@ OcclusionQueryNode::traverseQuery( const osg::Camera* camera, osg::NodeVisitor&
|
||||
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( _frameCountMutex );
|
||||
int& lastQueryFrame = _frameCountMap[ camera ];
|
||||
if ( issueQuery = (curFrame - lastQueryFrame >= _queryFrameCount) )
|
||||
issueQuery = (curFrame - lastQueryFrame >= _queryFrameCount);
|
||||
if (issueQuery)
|
||||
lastQueryFrame = curFrame;
|
||||
}
|
||||
if (issueQuery)
|
||||
|
||||
@@ -18,9 +18,9 @@ using namespace osgIntrospection;
|
||||
|
||||
void ConstructorInfo::getInheritedProviders(CustomAttributeProviderList& providers) const
|
||||
{
|
||||
for (int i=0; i<_decltype.getNumBaseTypes(); ++i)
|
||||
for (int i=0; i<_declarationType.getNumBaseTypes(); ++i)
|
||||
{
|
||||
const ConstructorInfo* ci = _decltype.getBaseType(i).getConstructor(_params);
|
||||
const ConstructorInfo* ci = _declarationType.getBaseType(i).getConstructor(_params);
|
||||
if (ci)
|
||||
{
|
||||
providers.push_back(ci);
|
||||
|
||||
@@ -18,9 +18,9 @@ using namespace osgIntrospection;
|
||||
|
||||
void MethodInfo::getInheritedProviders(CustomAttributeProviderList& providers) const
|
||||
{
|
||||
for (int i=0; i<_decltype.getNumBaseTypes(); ++i)
|
||||
for (int i=0; i<_declarationType.getNumBaseTypes(); ++i)
|
||||
{
|
||||
const MethodInfo* mi = _decltype.getBaseType(i).getMethod(_name, _params, false);
|
||||
const MethodInfo* mi = _declarationType.getBaseType(i).getMethod(_name, _params, false);
|
||||
if (mi)
|
||||
{
|
||||
providers.push_back(mi);
|
||||
@@ -31,7 +31,7 @@ void MethodInfo::getInheritedProviders(CustomAttributeProviderList& providers) c
|
||||
bool MethodInfo::overrides(const MethodInfo* other) const
|
||||
{
|
||||
if (isConst() != other->isConst()) return false;
|
||||
if (_decltype != other->_decltype) return false;
|
||||
if (_declarationType != other->_declarationType) return false;
|
||||
if (_rtype != other->_rtype) return false;
|
||||
if (_name != other->_name) return false;
|
||||
if (_params.size() != other->_params.size()) return false;
|
||||
|
||||
@@ -20,9 +20,9 @@ using namespace osgIntrospection;
|
||||
|
||||
void PropertyInfo::getInheritedProviders(CustomAttributeProviderList& providers) const
|
||||
{
|
||||
for (int i=0; i<_decltype.getNumBaseTypes(); ++i)
|
||||
for (int i=0; i<_declarationType.getNumBaseTypes(); ++i)
|
||||
{
|
||||
const PropertyInfo* pi = _decltype.getBaseType(i).getProperty(_name, _ptype, getIndexParameters(), false);
|
||||
const PropertyInfo* pi = _declarationType.getBaseType(i).getProperty(_name, _ptype, getIndexParameters(), false);
|
||||
if (pi)
|
||||
{
|
||||
providers.push_back(pi);
|
||||
@@ -43,7 +43,7 @@ Value PropertyInfo::getValue(const Value& instance) const
|
||||
}
|
||||
|
||||
if (!_getm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::GET);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::GET);
|
||||
|
||||
if (pta)
|
||||
return _getm->invoke(instance).convertTo(pta->getPropertyType());
|
||||
@@ -63,7 +63,7 @@ Value PropertyInfo::getValue(Value& instance) const
|
||||
}
|
||||
|
||||
if (!_getm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::GET);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::GET);
|
||||
|
||||
if (pta)
|
||||
return _getm->invoke(instance).convertTo(pta->getPropertyType());
|
||||
@@ -81,7 +81,7 @@ void PropertyInfo::setValue(Value& instance, const Value& value) const
|
||||
}
|
||||
|
||||
if (!_setm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::SET);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::SET);
|
||||
|
||||
ValueList args;
|
||||
args.push_back(value);
|
||||
@@ -101,7 +101,7 @@ Value PropertyInfo::getIndexedValue(const Value& instance, ValueList& args) cons
|
||||
}
|
||||
|
||||
if (!_getm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::IGET);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::IGET);
|
||||
|
||||
if (pta)
|
||||
return _getm->invoke(instance, args).convertTo(pta->getPropertyType());
|
||||
@@ -121,7 +121,7 @@ Value PropertyInfo::getIndexedValue(Value& instance, ValueList& args) const
|
||||
}
|
||||
|
||||
if (!_getm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::IGET);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::IGET);
|
||||
|
||||
if (pta)
|
||||
return _getm->invoke(instance, args).convertTo(pta->getPropertyType());
|
||||
@@ -138,7 +138,7 @@ void PropertyInfo::setIndexedValue(Value& instance, ValueList& args, const Value
|
||||
}
|
||||
|
||||
if (!_setm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::ISET);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::ISET);
|
||||
|
||||
ValueList tmpArgs(args);
|
||||
tmpArgs.push_back(value);
|
||||
@@ -151,7 +151,7 @@ int PropertyInfo::getNumArrayItems(const Value& instance) const
|
||||
if (ccount) return ccount->getCounter()->count(instance);
|
||||
|
||||
if (!_numm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::COUNT);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::COUNT);
|
||||
|
||||
return variant_cast<int>(_numm->invoke(instance));
|
||||
}
|
||||
@@ -169,7 +169,7 @@ Value PropertyInfo::getArrayItem(const Value& instance, int i) const
|
||||
}
|
||||
|
||||
if (!_getm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::AGET);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::AGET);
|
||||
|
||||
ValueList args;
|
||||
args.push_back(i);
|
||||
@@ -192,7 +192,7 @@ Value PropertyInfo::getArrayItem(Value& instance, int i) const
|
||||
}
|
||||
|
||||
if (!_getm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::AGET);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::AGET);
|
||||
|
||||
ValueList args;
|
||||
args.push_back(i);
|
||||
@@ -212,7 +212,7 @@ void PropertyInfo::setArrayItem(Value& instance, int i, const Value& value) cons
|
||||
}
|
||||
|
||||
if (!_setm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::ASET);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::ASET);
|
||||
|
||||
ValueList args;
|
||||
args.push_back(i);
|
||||
@@ -230,7 +230,7 @@ void PropertyInfo::addArrayItem(Value& instance, const Value& value) const
|
||||
}
|
||||
|
||||
if (!_addm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::ADD);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::ADD);
|
||||
|
||||
ValueList args;
|
||||
args.push_back(value);
|
||||
@@ -247,7 +247,7 @@ void PropertyInfo::insertArrayItem(Value& instance, int i, const Value& value) c
|
||||
}
|
||||
|
||||
if (!_addm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::INSERT);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::INSERT);
|
||||
|
||||
ValueList args;
|
||||
args.push_back(i);
|
||||
@@ -265,7 +265,7 @@ void PropertyInfo::removeArrayItem(Value& instance, int i) const
|
||||
}
|
||||
|
||||
if (!_remm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::REMOVE);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::REMOVE);
|
||||
|
||||
ValueList args;
|
||||
args.push_back(i);
|
||||
@@ -289,7 +289,7 @@ Value PropertyInfo::getDefaultValue() const
|
||||
}
|
||||
}
|
||||
|
||||
if (_decltype.isAbstract())
|
||||
if (_declarationType.isAbstract())
|
||||
{
|
||||
if (_ptype.isAbstract() || !_ptype.isDefined())
|
||||
return Value();
|
||||
@@ -297,7 +297,7 @@ Value PropertyInfo::getDefaultValue() const
|
||||
}
|
||||
|
||||
// auto default value
|
||||
Value instance = _decltype.createInstance();
|
||||
Value instance = _declarationType.createInstance();
|
||||
return getValue(instance);
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ void PropertyInfo::removeIndexedItem(Value& instance, ValueList& args) const
|
||||
}
|
||||
|
||||
if (!_remm)
|
||||
throw PropertyAccessException(_decltype.getQualifiedName() + "::" + _name, PropertyAccessException::REMOVE);
|
||||
throw PropertyAccessException(_declarationType.getQualifiedName() + "::" + _name, PropertyAccessException::REMOVE);
|
||||
|
||||
_remm->invoke(instance, args);
|
||||
}
|
||||
|
||||
@@ -995,9 +995,9 @@ int ConvexPolyhedron::isFacePolygonConvex( Face & face, bool ignoreColinearVerti
|
||||
osg::Vec3d vb = face.vertices[(i+1)%face.vertices.size()];
|
||||
osg::Vec3d vc = face.vertices[(i+2)%face.vertices.size()];
|
||||
|
||||
double dist = fabs( face.plane.distance( va ) );
|
||||
|
||||
#if ( CONVEX_POLYHEDRON_WARN_ON_INCOHERENT_DATA > 1 || CONVEX_POLYHEDRON_WARN_ON_CONCAVE_POLYGON )
|
||||
double dist = fabs( face.plane.distance( va ) );
|
||||
if( dist > 0.0001 )
|
||||
{
|
||||
WARN << "ConvexPolyhedron::isFacePolygonConvex - plane point too far from plane (" << dist <<")" << std::endl;
|
||||
@@ -1025,10 +1025,10 @@ int ConvexPolyhedron::isFacePolygonConvex( Face & face, bool ignoreColinearVerti
|
||||
if( !negative && !positive )
|
||||
return 0;
|
||||
|
||||
if( negative + colinear == face.vertices.size() )
|
||||
if( (negative + colinear) == static_cast<int>(face.vertices.size()) )
|
||||
return -( negative + colinear );
|
||||
|
||||
if( positive + colinear == face.vertices.size() )
|
||||
if( (positive + colinear) == static_cast<int>(face.vertices.size()) )
|
||||
return +( positive + colinear );
|
||||
|
||||
return 0;
|
||||
@@ -1599,15 +1599,15 @@ void ConvexPolyhedron::extrude( const osg::Vec3d & offset )
|
||||
double dotOffset1 = edgeFaces[1]->plane.getNormal() * offset;
|
||||
#endif
|
||||
//Select orthogonal faces and vertices appropriate for offseting
|
||||
if( dotOffset0 == 0.0 && dotOffset1 < 0.0 ||
|
||||
dotOffset1 == 0.0 && dotOffset0 < 0.0 )
|
||||
if( (dotOffset0 == 0.0 && dotOffset1 < 0.0) ||
|
||||
(dotOffset1 == 0.0 && dotOffset0 < 0.0) )
|
||||
{
|
||||
Face * face = ( dotOffset0 == 0 ? edgeFaces[0] : edgeFaces[1] );
|
||||
silhouetteFaces[ face ].insert( edge );
|
||||
}
|
||||
|
||||
if( dotOffset0 < 0.0 && dotOffset1 > 0.0 ||
|
||||
dotOffset1 < 0.0 && dotOffset0 > 0.0 )
|
||||
if( (dotOffset0 < 0.0 && dotOffset1 > 0.0) ||
|
||||
(dotOffset1 < 0.0 && dotOffset0 > 0.0) )
|
||||
{
|
||||
Face & face = createFace();
|
||||
char ac[40] = "Side plane from edge extrude ";
|
||||
|
||||
@@ -36,13 +36,13 @@ using namespace osgShadow;
|
||||
|
||||
DebugShadowMap::DebugShadowMap():
|
||||
BaseClass(),
|
||||
_doDebugDraw( false ),
|
||||
_hudSize( 2, 2 ),
|
||||
_hudOrigin( -1, -1 ),
|
||||
_viewportSize( DEFAULT_DEBUG_HUD_SIZE_X, DEFAULT_DEBUG_HUD_SIZE_Y ),
|
||||
_viewportOrigin( DEFAULT_DEBUG_HUD_ORIGIN_X, DEFAULT_DEBUG_HUD_ORIGIN_Y ),
|
||||
_orthoSize( 2, 2 ),
|
||||
_orthoOrigin( -1, -1 )
|
||||
_orthoOrigin( -1, -1 ),
|
||||
_doDebugDraw( false )
|
||||
{
|
||||
|
||||
// Why this fancy 24 bit depth to 24 bit rainbow colors shader ?
|
||||
@@ -104,13 +104,13 @@ DebugShadowMap::DebugShadowMap():
|
||||
DebugShadowMap::DebugShadowMap
|
||||
(const DebugShadowMap& copy, const osg::CopyOp& copyop) :
|
||||
BaseClass(copy,copyop),
|
||||
_doDebugDraw( copy._doDebugDraw ),
|
||||
_hudSize( copy._hudSize ),
|
||||
_hudOrigin( copy._hudOrigin ),
|
||||
_viewportSize( copy._viewportSize ),
|
||||
_viewportOrigin( copy._viewportOrigin ),
|
||||
_orthoSize( copy._viewportOrigin ),
|
||||
_orthoOrigin( copy._viewportOrigin )
|
||||
_orthoOrigin( copy._viewportOrigin ),
|
||||
_doDebugDraw( copy._doDebugDraw )
|
||||
{
|
||||
if( copy._depthColorFragmentShader.valid() )
|
||||
_depthColorFragmentShader =
|
||||
@@ -226,7 +226,7 @@ void DebugShadowMap::ViewData::setDebugPolytope
|
||||
|
||||
if( &polytope == NULL ) { // delete
|
||||
PolytopeGeometry & pg = _polytopeGeometryMap[ std::string( name ) ];
|
||||
for( int i = 0; i < VECTOR_LENGTH( pg._geometry ) ; i++ )
|
||||
for( unsigned int i = 0; i < VECTOR_LENGTH( pg._geometry ) ; i++ )
|
||||
{
|
||||
if( pg._geometry[i].valid() ) {
|
||||
if( _geode[i].valid() &&
|
||||
@@ -246,7 +246,7 @@ void DebugShadowMap::ViewData::setDebugPolytope
|
||||
if( colorInside.a() > 0 )
|
||||
pg._colorInside = colorInside;
|
||||
|
||||
for( int i = 0; i < VECTOR_LENGTH( pg._geometry ) ; i++ )
|
||||
for( unsigned int i = 0; i < VECTOR_LENGTH( pg._geometry ) ; i++ )
|
||||
{
|
||||
if( !pg._geometry[i].valid() ) {
|
||||
pg._geometry[i] = new osg::Geometry;
|
||||
@@ -274,8 +274,6 @@ void DebugShadowMap::ViewData::updateDebugGeometry
|
||||
|
||||
const int num = 2; // = VECTOR_LENGTH( PolytopeGeometry::_geometry );
|
||||
|
||||
const osg::Camera *camera[2] = { viewCam, shadowCam };
|
||||
|
||||
osg::Matrix
|
||||
transform[ num ] =
|
||||
{ viewCam->getViewMatrix() *
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
if ( !a ) return false; // NULL render leaf goes last
|
||||
return !b ||
|
||||
a->_projection < b->_projection ||
|
||||
a->_projection == b->_projection && a->_modelview < b->_modelview;
|
||||
(a->_projection == b->_projection && a->_modelview < b->_modelview);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -313,8 +313,10 @@ osg::BoundingBox MinimalCullBoundsShadowMap::ViewData::ComputeRenderLeavesBounds
|
||||
|
||||
osg::ref_ptr< osg::RefMatrix > modelview;
|
||||
osg::ref_ptr< osg::RefMatrix > projection;
|
||||
osg::Matrix viewToWorld, modelToWorld, *ptrProjection = NULL,
|
||||
*ptrViewToWorld = &projectionToWorld, *ptrModelToWorld;
|
||||
osg::Matrix viewToWorld, modelToWorld,
|
||||
*ptrProjection = NULL,
|
||||
*ptrViewToWorld = &projectionToWorld,
|
||||
*ptrModelToWorld = NULL;
|
||||
|
||||
// compute bounding boxes but skip old ones (placed at the end as NULLs)
|
||||
for( RenderLeafList::iterator it = rll.begin(); it != rll.end(); ++it ) {
|
||||
|
||||
@@ -148,7 +148,7 @@ osg::BoundingBox MinimalDrawBoundsShadowMap::ViewData::scanImage
|
||||
|
||||
unsigned char * pb = (unsigned char *)image->data();
|
||||
|
||||
float scale = 1.f / 254, bias = 0.5f;
|
||||
float scale = 1.f / 254;
|
||||
for( int y = 0; y < image->t(); y++ ) {
|
||||
float fY = ( 0.5f + y ) / image->t();
|
||||
for( int x = 0; x < image->s(); x++ ) {
|
||||
|
||||
@@ -571,7 +571,7 @@ void ProxyLayer::dirty()
|
||||
void ProxyLayer::setModifiedCount(unsigned int value)
|
||||
{
|
||||
if (_implementation.valid()) _implementation->setModifiedCount(value);
|
||||
};
|
||||
}
|
||||
|
||||
unsigned int ProxyLayer::getModifiedCount() const
|
||||
{
|
||||
|
||||
@@ -666,9 +666,9 @@ void Font::GlyphTexture::apply(osg::State& state) const
|
||||
}
|
||||
|
||||
if (s_renderer &&
|
||||
(strstr((const char*)s_renderer,"Radeon")!=0) ||
|
||||
((strstr((const char*)s_renderer,"Radeon")!=0) ||
|
||||
(strstr((const char*)s_renderer,"RADEON")!=0) ||
|
||||
(strstr((const char*)s_renderer,"ALL-IN-WONDER")!=0))
|
||||
(strstr((const char*)s_renderer,"ALL-IN-WONDER")!=0)))
|
||||
{
|
||||
// we're running on an ATI, so need to work around its
|
||||
// subloading bugs by loading all at once.
|
||||
|
||||
@@ -304,13 +304,13 @@ std::string String::createUTF8EncodedString() const
|
||||
else if (currentChar < 0x800)
|
||||
{
|
||||
utf8string+=(char)(0xc0 | (currentChar>>6));
|
||||
utf8string+=(char)(0x80 | currentChar & 0x3f);
|
||||
utf8string+=(char)(0x80 | (currentChar & 0x3f));
|
||||
}
|
||||
else
|
||||
{
|
||||
utf8string+=(char)(0xe0 | (currentChar>>12));
|
||||
utf8string+=(char)(0x80 | (currentChar>>6) & 0x3f);
|
||||
utf8string+=(char)(0x80 | currentChar & 0x3f);
|
||||
utf8string+=(char)(0x80 | ((currentChar>>6) & 0x3f));
|
||||
utf8string+=(char)(0x80 | (currentChar & 0x3f));
|
||||
}
|
||||
}
|
||||
return utf8string;
|
||||
|
||||
Reference in New Issue
Block a user