OpenSceneGraph 3.6.5
Bone
Go to the documentation of this file.
1/* -*-c++-*-
2 * Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
3 *
4 * This library is open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version. The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * OpenSceneGraph Public License for more details.
13 *
14 * Authors:
15 * Cedric Pinson <cedric.pinson@plopbyte.net>
16 * Michael Platings <mplatings@pixelpower.com>
17 */
18
19#ifndef OSGANIMATION_BONE
20#define OSGANIMATION_BONE 1
21
22#include <osg/MatrixTransform>
23#include <osgAnimation/Export>
24
25namespace osgAnimation
26{
27
28 // A bone can't have more than one parent Bone, so sharing a part of Bone's hierarchy
29 // makes no sense. You can share the entire hierarchy but not only a part of it.
31 {
32 public:
34
37 Bone(const std::string& name = "");
38
39 void setDefaultUpdateCallback(const std::string& name = "");
40
42 const Bone* getBoneParent() const;
43
44 const osg::Matrix& getMatrixInBoneSpace() const { return getMatrix();}
49
50 protected:
51
52 // bind data
54
55 // bone updated
57 };
58
59 typedef std::map<std::string, osg::ref_ptr<Bone> > BoneMap;
60}
61#endif
Matrixd Matrix
Definition Matrix:27
The osgAnimation library provides general purpose utility classes for animation.
Definition Action:34
std::map< std::string, osg::ref_ptr< Bone > > BoneMap
Definition Bone:59
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
MatrixTransform - is a subclass of Transform which has an osg::Matrix which represents a 4x4 transfor...
Definition MatrixTransform:26
const Matrix & getMatrix() const
Get the matrix.
Definition MatrixTransform:47
Bone * getBoneParent()
void setMatrixInSkeletonSpace(const osg::Matrix &matrix)
Definition Bone:47
osg::Matrix _boneInSkeletonSpace
Definition Bone:56
Bone(const Bone &b, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
const osg::Matrix & getInvBindMatrixInSkeletonSpace() const
Definition Bone:46
const osg::Matrix & getMatrixInBoneSpace() const
Definition Bone:44
osg::Matrix MatrixType
Definition Bone:33
void setInvBindMatrixInSkeletonSpace(const osg::Matrix &matrix)
Definition Bone:48
void setDefaultUpdateCallback(const std::string &name="")
const Bone * getBoneParent() const
const osg::Matrix & getMatrixInSkeletonSpace() const
Definition Bone:45
Bone(const std::string &name="")
osg::Matrix _invBindInSkeletonSpace
Definition Bone:53
META_Node(osgAnimation, Bone)
#define OSGANIMATION_EXPORT
Definition Export:40

osg logo
Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.