Blender V4.5
BCSampleData.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include <map>
8#include <string>
9
10#include "BCMath.h"
11
12#include "DNA_armature_types.h"
13#include "DNA_object_types.h"
14
15using BCBoneMatrixMap = std::map<Bone *, BCMatrix *>;
16
17class BCSample {
18 private:
19 BCMatrix obmat;
20 BCBoneMatrixMap bonemats; /* For Armature animation */
21
22 public:
23 BCSample(Object *ob) : obmat(ob) {}
24
25 ~BCSample();
26
27 void add_bone_matrix(Bone *bone, Matrix &mat);
28
30 bool get_value(std::string channel_target, int array_index, float *val) const;
31 const BCMatrix &get_matrix() const;
32 const BCMatrix *get_matrix(Bone *bone) const; /* returns NULL if bone is not animated */
33};
34
35using BCSampleMap = std::map<Object *, BCSample *>;
36using BCFrameSampleMap = std::map<int, const BCSample *>;
37using BCMatrixSampleMap = std::map<int, const BCMatrix *>;
std::map< int, const BCMatrix * > BCMatrixSampleMap
std::map< int, const BCSample * > BCFrameSampleMap
std::map< Bone *, BCMatrix * > BCBoneMatrixMap
std::map< Object *, BCSample * > BCSampleMap
float[4][4] Matrix
Object is a sort of wrapper for general info.
bool get_value(std::string channel_target, int array_index, float *val) const
BCSample(Object *ob)
const BCMatrix & get_matrix() const
void add_bone_matrix(Bone *bone, Matrix &mat)