~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/gameengine/Converter/BL_ArmatureObject.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: BL_ArmatureObject.cpp,v 1.4 2004/03/22 22:01:25 jesterking Exp $
 
2
 * $Id: BL_ArmatureObject.cpp,v 1.5 2005/04/23 11:36:44 kester Exp $
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
39
39
#include "GEN_HashedPtr.h"
40
40
#include "MEM_guardedalloc.h"
41
41
#include "DNA_action_types.h"
 
42
#include "DNA_armature_types.h"
 
43
#include "DNA_object_types.h"
 
44
 
 
45
#include "MT_Matrix4x4.h"
42
46
 
43
47
#ifdef HAVE_CONFIG_H
44
48
#include <config.h>
72
76
void BL_ArmatureObject::ApplyPose()
73
77
{
74
78
        if (m_pose){
75
 
                apply_pose_armature(m_armature, m_pose, 1);
 
79
                apply_pose_armature(GetArmature(), m_pose, 1);
76
80
                if (!m_mrdPose)
77
81
                        copy_pose (&m_mrdPose, m_pose, 0);
78
82
                else
151
155
{
152
156
        return m_lastframe;
153
157
}
 
158
 
 
159
bool BL_ArmatureObject::GetBoneMatrix(Bone* bone, MT_Matrix4x4& matrix) const
 
160
{
 
161
        MT_assert(verify_boneptr((bArmature*) GetArmature(), bone) && "Bone is not part of this armature.");
 
162
        
 
163
        matrix.setValue(&bone->posemat[0][0]);
 
164
        
 
165
        return true;
 
166
}
 
167
 
 
168
float BL_ArmatureObject::GetBoneLength(Bone* bone) const
 
169
{
 
170
        MT_assert(verify_boneptr((bArmature*) GetArmature(), bone) && "Bone is not part of this armature.");
 
171
        
 
172
        return (MT_Point3(bone->head) - MT_Point3(bone->tail)).length();
 
173
}
 
174
 
 
175