synfig-core  1.0.3
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
synfig::Bone Class Reference

#include <bone.h>

Inheritance diagram for synfig::Bone:
synfig::UniqueID

Classes

struct  Shape

Public Types

typedef etl::handle< BoneHandle

Public Member Functions

 Bone ()
 Default constructor.
 Bone (const Point &origin, const Point &tip)
 Constructor by origin and tip.
 Bone (const String &name, const Point &origin, const Angle &angle, const Real &length, ValueNode_Bone *p=0)
 Construtor by origin, legth and parent (default no parent)
const Stringget_name () const
 Wrappers for name_.
void set_name (const String &x)
const Pointget_origin () const
 Wrappers for origin_.
void set_origin (const Point &x)
const Angleget_angle () const
 Wrappers for angle_.
void set_angle (const Angle &x)
const Realget_scalelx () const
 Wrapper for scalelx.
void set_scalelx (const Real &x)
const Realget_scalex () const
 Wrapper for scalex.
void set_scalex (const Real &x)
const Realget_length () const
 Wrapper for length. Notice that a length of 0 is not allowed.
void set_length (const Real &x)
const Realget_width () const
 Wrapper for width.
void set_width (const Real &x)
const Realget_tipwidth () const
 Wrapper for tipwidth.
void set_tipwidth (const Real &x)
const Realget_depth () const
 Wrapper for depth.
void set_depth (const Real &x)
Point get_tip ()
const ValueNode_Boneget_parent () const
 Wrapper for parent bone.
void set_parent (const ValueNode_Bone *parent)
void add_bone_to_map ()
Bonefind_bone_in_map (int uid)
Matrix get_animated_matrix () const
void set_animated_matrix (Matrix x)
Vector get_local_scale () const
synfig::String get_string () const
bool is_root () const
Shape get_shape () const
Real distance_to_shape_center_percent (const Vector &x) const
Real influence_percent (const Vector &x) const
bool have_influence_on (const Vector &x) const
- Public Member Functions inherited from synfig::UniqueID
const int & get_uid () const
 Returns the internal unique identifier for this object.
 UniqueID ()
void make_unique ()
 operator bool () const
void mimic (const UniqueID &x)
bool operator== (const UniqueID &rhs) const
bool operator!= (const UniqueID &rhs) const
bool operator< (const UniqueID &rhs) const

Static Public Member Functions

static Real distance_to_shape_center_percent (const Shape &shape, const Vector &x)
static Real influence_function (Real distance_percent)
static Real influence_percent (const Shape &shape, const Vector &x)
- Static Public Member Functions inherited from synfig::UniqueID
static const UniqueID nil ()

Member Typedef Documentation

typedef etl::handle<Bone> synfig::Bone::Handle

Constructor & Destructor Documentation

Bone::Bone ( )

Default constructor.

Bone::Bone ( const Point origin,
const Point tip 
)

Constructor by origin and tip.

Bone::Bone ( const String name,
const Point origin,
const Angle angle,
const Real length,
ValueNode_Bone p = 0 
)

Construtor by origin, legth and parent (default no parent)

Constructor by origin, angle, length, strength, parent bone (default = no parent)

Member Function Documentation

const String& synfig::Bone::get_name ( ) const
inline

Wrappers for name_.

Referenced by synfig::BoneWeightPair::get_string().

void synfig::Bone::set_name ( const String x)
inline
const Point& synfig::Bone::get_origin ( ) const
inline

Wrappers for origin_.

void synfig::Bone::set_origin ( const Point x)
inline
const Angle& synfig::Bone::get_angle ( ) const
inline

Wrappers for angle_.

void synfig::Bone::set_angle ( const Angle x)
inline
const Real& synfig::Bone::get_scalelx ( ) const
inline

Wrapper for scalelx.

Referenced by get_shape(), and synfig::Layer_Skeleton::sync().

void synfig::Bone::set_scalelx ( const Real x)
inline
const Real& synfig::Bone::get_scalex ( ) const
inline

Wrapper for scalex.

void synfig::Bone::set_scalex ( const Real x)
inline
const Real& synfig::Bone::get_length ( ) const
inline

Wrapper for length. Notice that a length of 0 is not allowed.

Referenced by synfig::ValueNode_StaticList::create_list_entry(), get_shape(), and synfig::Layer_Skeleton::sync().

void synfig::Bone::set_length ( const Real x)
inline
const Real& synfig::Bone::get_width ( ) const
inline

Wrapper for width.

Referenced by get_shape(), and synfig::Layer_Skeleton::sync().

void synfig::Bone::set_width ( const Real x)
inline
const Real& synfig::Bone::get_tipwidth ( ) const
inline
void synfig::Bone::set_tipwidth ( const Real x)
inline
const Real& synfig::Bone::get_depth ( ) const
inline

Wrapper for depth.

Referenced by synfig::ValueNode_StaticList::create_list_entry().

void synfig::Bone::set_depth ( const Real x)
inline
Point Bone::get_tip ( )

This gets the calculated tip of the bone based on tip=origin+[length,0]*Rotate(alpha)*Scalex(scalex*scalelx)

get_tip() member function

Returns
The tip Point of the bone (calculated) based on tip=origin+[length,0]*Scalex(scalex*scalelx,0)*Rotate(alpha)

References synfig::Matrix::get_transformed(), synfig::Matrix::set_rotate(), and synfig::Matrix::set_scale().

const ValueNode_Bone * Bone::get_parent ( ) const

Wrapper for parent bone.

Referenced by is_root().

void Bone::set_parent ( const ValueNode_Bone parent)
void synfig::Bone::add_bone_to_map ( )
Bone* synfig::Bone::find_bone_in_map ( int  uid)
Matrix synfig::Bone::get_animated_matrix ( ) const
inline

Animated Transformation matrix. This matrix applied to a setup point in local coordinates (the one obtained form the Setup Transformation matrix) would obtain the animated position of the point due the current bone influence

Referenced by synfig::ValueNode_BoneLink::get_bone_transformation(), get_shape(), and synfig::Layer_Skeleton::sync().

void synfig::Bone::set_animated_matrix ( Matrix  x)
inline
Vector synfig::Bone::get_local_scale ( ) const
inline
synfig::String Bone::get_string ( ) const

Get the string of the Bone

Returns
String type. A string representation of the bone components.
bool Bone::is_root ( ) const
Bone::Shape Bone::get_shape ( ) const
Real Bone::distance_to_shape_center_percent ( const Shape shape,
const Vector x 
)
static
Real Bone::influence_function ( Real  distance_percent)
static

References PI.

Referenced by influence_percent().

static Real synfig::Bone::influence_percent ( const Shape shape,
const Vector x 
)
inlinestatic
Real synfig::Bone::distance_to_shape_center_percent ( const Vector x) const
inline
Real synfig::Bone::influence_percent ( const Vector x) const
inline

References get_shape(), and influence_percent().

Referenced by influence_percent().

bool synfig::Bone::have_influence_on ( const Vector x) const
inline

The documentation for this class was generated from the following files: