Blender  V3.3
BCSampleData.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
4 #pragma once
5 
6 #include <algorithm>
7 #include <map>
8 #include <string>
9 
10 #include "BCMath.h"
11 #include "BCSampleData.h"
12 #include "ExportSettings.h"
13 
14 #include "BKE_object.h"
15 
16 #include "BLI_math_rotation.h"
17 
18 #include "DNA_armature_types.h"
19 #include "DNA_camera_types.h"
20 #include "DNA_light_types.h"
21 #include "DNA_material_types.h"
22 #include "DNA_object_types.h"
23 
24 typedef std::map<Bone *, BCMatrix *> BCBoneMatrixMap;
25 
26 class BCSample {
27  private:
28  BCMatrix obmat;
29  BCBoneMatrixMap bonemats; /* For Armature animation */
30 
31  public:
32  BCSample(Object *ob) : obmat(ob)
33  {
34  }
35 
36  ~BCSample();
37 
38  void add_bone_matrix(Bone *bone, Matrix &mat);
39 
41  bool get_value(std::string channel_target, int array_index, float *val) const;
42  const BCMatrix &get_matrix() const;
43  const BCMatrix *get_matrix(Bone *bone) const; /* returns NULL if bone is not animated */
44 };
45 
46 typedef std::map<Object *, BCSample *> BCSampleMap;
47 typedef std::map<int, const BCSample *> BCFrameSampleMap;
48 typedef std::map<int, const BCMatrix *> BCMatrixSampleMap;
std::map< Bone *, BCMatrix * > BCBoneMatrixMap
Definition: BCSampleData.h:24
std::map< int, const BCSample * > BCFrameSampleMap
Definition: BCSampleData.h:47
std::map< Object *, BCSample * > BCSampleMap
Definition: BCSampleData.h:46
std::map< int, const BCMatrix * > BCMatrixSampleMap
Definition: BCSampleData.h:48
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)
Definition: BCSampleData.h:32
const BCMatrix & get_matrix() const
void add_bone_matrix(Bone *bone, Matrix &mat)