Fixed build errors when compiling with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF

This commit is contained in:
Robert Osfield
2017-10-27 14:19:13 +01:00
parent 2b6ffad99a
commit 671847387f
7 changed files with 12 additions and 12 deletions

View File

@@ -91,13 +91,13 @@ namespace osgAnimation
inline void setVertexSource(osg::Vec3Array *v){ _positionSource=v;}
/** Get source of vertices for this morph geometry */
inline osg::Vec3Array * getVertexSource()const{return _positionSource;}
inline osg::Vec3Array * getVertexSource()const{return _positionSource.get();}
/** Set source of normals for this morph geometry */
inline void setNormalSource(osg::Vec3Array *n){ _normalSource=n;}
/** Get source of normals for this morph geometry */
inline osg::Vec3Array * getNormalSource()const{return _normalSource;}
inline osg::Vec3Array * getNormalSource() const {return _normalSource.get();}
/** Add a \c MorphTarget to the \c MorphGeometry.
* If \c MorphTarget is not \c NULL and is not contained in the \c MorphGeometry

View File

@@ -43,8 +43,8 @@ namespace osgAnimation
virtual void operator()(MorphGeometry&);
inline void setShader( osg::Shader*s ) { _shader=s; }
inline const osg::Shader * getShader() const{ return _shader; }
inline osg::Shader * getShader() { return _shader; }
inline const osg::Shader * getShader() const{ return _shader.get(); }
inline osg::Shader * getShader() { return _shader.get(); }
///texture unit reserved for morphtarget TBO default is 7
void setReservedTextureUnit(unsigned int t) { _reservedTextureUnit=t; }

View File

@@ -50,8 +50,8 @@ namespace osgAnimation
unsigned int getFirstVertexAttributeTarget()const { return _minAttribIndex;}
void setShader(osg::Shader* shader) { _shader = shader; }
const osg::Shader* getShader() const { return _shader; }
osg::Shader* getShader() { return _shader; }
const osg::Shader* getShader() const { return _shader.get(); }
osg::Shader* getShader() { return _shader.get(); }
osg::Vec4Array* getVertexAttrib(unsigned int index);
unsigned int getNumVertexAttrib() const {return _boneWeightAttribArrays.size();}
@@ -61,7 +61,7 @@ namespace osgAnimation
const BoneNamePaletteIndex& getBoneNameToPalette(){ return _boneNameToPalette; }
const BonePalette& getBonePalette() { return _bonePalette; }
osg::Uniform* getMatrixPaletteUniform() { return _uniformMatrixPalette; }
osg::Uniform* getMatrixPaletteUniform() { return _uniformMatrixPalette.get(); }
void computeMatrixPaletteUniform(const osg::Matrix& transformFromSkeletonToGeometry, const osg::Matrix& invTransformFromSkeletonToGeometry);

View File

@@ -47,7 +47,7 @@ MorphGeometry::MorphGeometry(const osg::Geometry& g) :
MorphGeometry::MorphGeometry(const MorphGeometry& b, const osg::CopyOp& copyop) :
osg::Geometry(b,copyop),
_morphTransformImplementation((MorphTransform*)copyop(b._morphTransformImplementation)),
_morphTransformImplementation(osg::clone(b._morphTransformImplementation.get(), copyop)),
_dirty(b._dirty),
_method(b._method),
_morphTargets(b._morphTargets),

View File

@@ -67,7 +67,7 @@ RigGeometry::RigGeometry()
RigGeometry::RigGeometry(const RigGeometry& b, const osg::CopyOp& copyop) :
osg::Geometry(b,copyop),
_geometry(b._geometry),
_rigTransformImplementation((RigTransform*)copyop(b._rigTransformImplementation)),
_rigTransformImplementation(osg::clone(_rigTransformImplementation.get(), copyop)),
_vertexInfluenceMap(b._vertexInfluenceMap),
_needToComputeMatrix(b._needToComputeMatrix)
{

View File

@@ -279,7 +279,7 @@ void VertexInfluenceMap::removeUnexpressedBones(Skeleton &skel) const
}
///Bone can be removed
Bone * bone2rm = bmit->second;
Bone * bone2rm = bmit->second.get();
for(unsigned int numchild = 0; numchild < bone2rm->getNumChildren(); numchild++)
{
if( (child = dynamic_cast<Bone*>(bone2rm->getChild(numchild))) )

View File

@@ -41,8 +41,8 @@ static bool writeMorphTargets( osgDB::OutputStream& os, const osgAnimation::Morp
{ return geom.get##PROP()!=0; } \
static bool read##ORIGINAL_PROP( osgDB::InputStream& is, osgAnimation::MorphGeometry& geom ) { \
is >> is.BEGIN_BRACKET; \
osg::Array* array =is.readArray(); \
geom.set##PROP((osg::Vec3Array*)array); \
osg::ref_ptr<osg::Array> array = is.readArray(); \
geom.set##PROP(dynamic_cast<osg::Vec3Array*>(array.get())); \
is >> is.END_BRACKET; \
return true; \
} \