reformat with the help of AStyle reformat tool (codeblocks)

This commit is contained in:
Julien Valentin
2017-10-27 21:02:43 +02:00
parent 6530b16fc7
commit 6e79ce348d
8 changed files with 95 additions and 90 deletions

View File

@@ -23,7 +23,6 @@
namespace osgAnimation
{
// The idea is to compute a bounding box with a factor x of the first step we compute the bounding box
class OSGANIMATION_EXPORT RigComputeBoundingBoxCallback : public osg::Drawable::ComputeBoundingBoxCallback
{
@@ -37,8 +36,8 @@ namespace osgAnimation
META_Object(osgAnimation, RigComputeBoundingBoxCallback);
void reset() { _computed = false; }
virtual osg::BoundingBox computeBound(const osg::Drawable& drawable) const;
protected:
mutable bool _computed;
@@ -58,16 +57,16 @@ namespace osgAnimation
META_Object(osgAnimation, RigGeometry);
inline void setInfluenceMap(VertexInfluenceMap* vertexInfluenceMap) { _vertexInfluenceMap = vertexInfluenceMap; }
inline const VertexInfluenceMap* getInfluenceMap() const { return _vertexInfluenceMap.get();}
inline VertexInfluenceMap* getInfluenceMap() { return _vertexInfluenceMap.get();}
inline const VertexInfluenceMap* getInfluenceMap() const { return _vertexInfluenceMap.get(); }
inline VertexInfluenceMap* getInfluenceMap() { return _vertexInfluenceMap.get(); }
inline const Skeleton* getSkeleton() const { return _root.get(); }
inline Skeleton* getSkeleton() { return _root.get(); }
// will be used by the update callback to init correctly the rig mesh
inline void setSkeleton(Skeleton* root){ _root = root;}
inline void setSkeleton(Skeleton* root) { _root = root; }
void setNeedToComputeMatrix(bool state) { _needToComputeMatrix = state;}
bool getNeedToComputeMatrix() const { return _needToComputeMatrix;}
void setNeedToComputeMatrix(bool state) { _needToComputeMatrix = state; }
bool getNeedToComputeMatrix() const { return _needToComputeMatrix; }
void computeMatrixFromRootSkeleton();
@@ -78,9 +77,10 @@ namespace osgAnimation
void update();
void buildVertexInfluenceSet(){_rigTransformImplementation->prepareData(*this);}
void buildVertexInfluenceSet() { _rigTransformImplementation->prepareData(*this); }
const osg::Matrix& getMatrixFromSkeletonToGeometry() const;
const osg::Matrix& getInvMatrixFromSkeletonToGeometry() const;
inline osg::Geometry* getSourceGeometry() { return _geometry.get(); }
@@ -106,7 +106,6 @@ namespace osgAnimation
osg::ref_ptr<osg::Geometry> _geometry;
osg::ref_ptr<RigTransform> _rigTransformImplementation;
osg::ref_ptr<VertexInfluenceMap> _vertexInfluenceMap;
osg::Matrix _matrixFromSkeletonToGeometry;
@@ -114,8 +113,7 @@ namespace osgAnimation
osg::observer_ptr<Skeleton> _root;
bool _needToComputeMatrix;
};
};
struct UpdateRigGeometry : public osg::Drawable::UpdateCallback
@@ -129,7 +127,8 @@ namespace osgAnimation
META_Object(osgAnimation, UpdateRigGeometry);
virtual void update(osg::NodeVisitor* nv, osg::Drawable* drw) {
virtual void update(osg::NodeVisitor* nv, osg::Drawable* drw)
{
RigGeometry* geom = dynamic_cast<RigGeometry*>(drw);
if(!geom)
return;
@@ -155,7 +154,8 @@ namespace osgAnimation
if(geom->getNeedToComputeMatrix())
geom->computeMatrixFromRootSkeleton();
if(geom->getSourceGeometry()) {
if(geom->getSourceGeometry())
{
osg::Drawable::UpdateCallback * up = dynamic_cast<osg::Drawable::UpdateCallback*>(geom->getSourceGeometry()->getUpdateCallback());
if(up)
up->update(nv, geom->getSourceGeometry());