Blender V4.3
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 <algorithm>
8#include <map>
9#include <string>
10
11#include "BCMath.h"
12#include "BCSampleData.h"
13#include "ExportSettings.h"
14
15#include "BKE_object.hh"
16
17#include "BLI_math_rotation.h"
18
19#include "DNA_armature_types.h"
20#include "DNA_camera_types.h"
21#include "DNA_light_types.h"
22#include "DNA_material_types.h"
23#include "DNA_object_types.h"
24
25typedef std::map<Bone *, BCMatrix *> BCBoneMatrixMap;
26
27class BCSample {
28 private:
29 BCMatrix obmat;
30 BCBoneMatrixMap bonemats; /* For Armature animation */
31
32 public:
33 BCSample(Object *ob) : obmat(ob) {}
34
35 ~BCSample();
36
37 void add_bone_matrix(Bone *bone, Matrix &mat);
38
40 bool get_value(std::string channel_target, int array_index, float *val) const;
41 const BCMatrix &get_matrix() const;
42 const BCMatrix *get_matrix(Bone *bone) const; /* returns NULL if bone is not animated */
43};
44
45typedef std::map<Object *, BCSample *> BCSampleMap;
46typedef std::map<int, const BCSample *> BCFrameSampleMap;
47typedef std::map<int, const BCMatrix *> BCMatrixSampleMap;
std::map< Bone *, BCMatrix * > BCBoneMatrixMap
std::map< int, const BCSample * > BCFrameSampleMap
std::map< Object *, BCSample * > BCSampleMap
std::map< int, const BCMatrix * > BCMatrixSampleMap
General operations, lookup, etc. for blender objects.
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)