synfig-core
1.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
synfig
boneweightpair.h
Go to the documentation of this file.
1
/* === S Y N F I G ========================================================= */
22
/* ========================================================================= */
23
24
/* === S T A R T =========================================================== */
25
26
#ifndef __SYNFIG_BONE_WEIGHT_PAIR_H
27
#define __SYNFIG_BONE_WEIGHT_PAIR_H
28
29
/* === H E A D E R S ======================================================= */
30
31
#include "
real.h
"
32
#include "
string.h
"
33
#include "
bone.h
"
34
// #include <ETL/handle>
35
#include <ETL/stringf>
36
37
/* === M A C R O S ========================================================= */
38
39
/* === T Y P E D E F S ===================================================== */
40
41
/* === C L A S S E S & S T R U C T S ======================================= */
42
43
namespace
synfig {
44
45
//class ValueNode_Bone;
46
50
class
BoneWeightPair
51
{
52
private
:
53
// etl::handle<ValueNode_Bone> bone;
54
Bone
bone;
55
Real
weight;
56
57
public
:
58
BoneWeightPair
(): weight() {}
59
BoneWeightPair
(
Bone
bone,
Real
weight): bone(bone), weight(weight) { }
60
61
Real
get_weight
()
const
{
return
weight; }
62
Bone
get_bone
()
const
{
return
bone; }
63
66
String
get_string
()
const
{
return
etl::strprintf(
"(%.2f) %s"
, weight, bone.
get_name
().c_str()); }
67
};
68
69
};
// END of namespace synfig
70
71
#endif
Generated on Mon Nov 16 2015 15:33:36 for synfig-core by
1.8.1.2