25 BCBoneMatrixMap::iterator it;
26 for (it = bonemats.begin(); it != bonemats.end(); ++it) {
34 BCBoneMatrixMap::const_iterator it = bonemats.find(bone);
35 if (it != bonemats.end()) {
36 throw std::invalid_argument(
"bone " + std::string(bone->
name) +
" already defined before");
39 bonemats[bone] = matrix;
49 if (bname != channel_target) {
50 bname = bname.substr(2);
52 BCBoneMatrixMap::const_iterator it;
53 for (it = bonemats.begin(); it != bonemats.end(); ++it) {
54 Bone *bone = it->first;
55 if (bname == bone->
name) {
65 if (channel_type ==
"location") {
66 *val = matrix->
location()[array_index];
68 else if (channel_type ==
"scale") {
69 *val = matrix->
scale()[array_index];
71 else if (channel_type ==
"rotation" || channel_type ==
"rotation_euler") {
72 *val = matrix->
rotation()[array_index];
74 else if (channel_type ==
"rotation_quaternion") {
75 *val = matrix->
quat()[array_index];
87 BCBoneMatrixMap::const_iterator it = bonemats.find(bone);
88 if (it == bonemats.end()) {
float(& rotation() const)[3]
float(& scale() const)[3]
float(& location() const)[3]
const BCMatrix & get_matrix() const
void add_bone_matrix(Bone *bone, Matrix &mat)
bool get_value(std::string channel_target, const int array_index, float *val) const
std::string bc_string_after(const std::string &s, const std::string probe)
std::string bc_string_before(const std::string &s, const std::string probe)