Flatland
Public Types | Public Attributes | Static Public Attributes | List of all members
flatland_plugins::Tween Class Reference
Inheritance diagram for flatland_plugins::Tween:
Inheritance graph
[legend]
Collaboration diagram for flatland_plugins::Tween:
Collaboration graph
[legend]

Public Types

enum  ModeType_ { YOYO, LOOP, ONCE, TRIGGER }
 
enum  EasingType_ {
  linear, quadraticIn, quadraticOut, quadraticInOut,
  cubicIn, cubicOut, cubicInOut, quarticIn,
  quarticOut, quarticInOut, quinticIn, quinticOut,
  quinticInOut, exponentialIn, exponentialOut, exponentialInOut,
  circularIn, circularOut, circularInOut, backIn,
  backOut, backInOut, elasticIn, elasticOut,
  elasticInOut, bounceIn, bounceOut, bounceInOut
}
 
- Public Types inherited from flatland_server::FlatlandPlugin
enum  PluginType { Invalid, Model, World }
 

Public Member Functions

OnInitialize

override the BeforePhysicsStep method

Parameters
[in]configThe plugin YAML node
void OnInitialize (const YAML::Node &config) override
 The method for the particular model plugin to override and provide its own initialization. More...
 
BeforePhysicsStep

override the BeforePhysicsStep method

Parameters
[in]configThe plugin YAML node
void BeforePhysicsStep (const Timekeeper &timekeeper) override
 This method is called before the Box2D physics step. More...
 
TriggerCallback

Handles external tween triggers for mode "trigger"

Parameters
[in]Theboolean message
void TriggerCallback (const std_msgs::Bool &msg)
 
- Public Member Functions inherited from flatland_server::ModelPlugin
ModelGetModel ()
 Get model.
 
void Initialize (const std::string &type, const std::string &name, Model *model, const YAML::Node &config)
 The method to initialize the ModelPlugin, required since Pluginlib require the class to have a default constructor. More...
 
bool FilterContact (b2Contact *contact, Entity *&entity, b2Fixture *&this_fixture, b2Fixture *&other_fixture)
 Helper function check if this model is part of the contact, and extracts all the useful information. More...
 
bool FilterContact (b2Contact *contact)
 Helper function check if this model is part of the contact. More...
 
- Public Member Functions inherited from flatland_server::FlatlandPlugin
const PluginType Type ()
 
const std::string & GetName () const
 Get plugin name.
 
const std::string & GetType () const
 Get type of plugin.
 
virtual void AfterPhysicsStep (const Timekeeper &timekeeper)
 This method is called after the Box2D physics step. More...
 
virtual void BeginContact (b2Contact *contact)
 A method that is called for all Box2D begin contacts. More...
 
virtual void EndContact (b2Contact *contact)
 A method that is called for all Box2D end contacts. More...
 
virtual void PreSolve (b2Contact *contact, const b2Manifold *oldManifold)
 A method that is called for Box2D presolve. More...
 
virtual void PostSolve (b2Contact *contact, const b2ContactImpulse *impulse)
 A method that is called for Box2D postsolve. More...
 
virtual ~FlatlandPlugin ()=default
 Flatland plugin destructor.
 

Public Attributes

Bodybody_
 
Pose start_
 
Pose delta_
 
float duration_
 
ros::Subscriber trigger_sub_
 
bool triggered_ = false
 
tweeny::tween< double, double, double > tween_
 
ModeType_ mode_
 
- Public Attributes inherited from flatland_server::ModelPlugin
ros::NodeHandle nh_
 ROS node handle.
 
- Public Attributes inherited from flatland_server::FlatlandPlugin
std::string type_
 type of the plugin
 
std::string name_
 name of the plugin
 
ros::NodeHandle nh_
 
PluginType plugin_type_
 

Static Public Attributes

static std::map< std::string, Tween::ModeType_ > mode_strings_
 
static std::map< std::string, Tween::EasingType_ > easing_strings_
 

Additional Inherited Members

- Protected Member Functions inherited from flatland_server::ModelPlugin
 ModelPlugin ()=default
 Model plugin default constructor.
 

Member Function Documentation

void flatland_plugins::Tween::BeforePhysicsStep ( const Timekeeper timekeeper)
overridevirtual

This method is called before the Box2D physics step.

Parameters
[in]timekeeperprovide time related information

Reimplemented from flatland_server::FlatlandPlugin.

void flatland_plugins::Tween::OnInitialize ( const YAML::Node &  config)
overridevirtual

The method for the particular model plugin to override and provide its own initialization.

Parameters
[in]configThe plugin YAML node

Implements flatland_server::FlatlandPlugin.

Member Data Documentation

std::map< std::string, Tween::EasingType_ > flatland_plugins::Tween::easing_strings_
static
Initial value:
= {
{"linear", Tween::EasingType_::linear},
{"quadraticIn", Tween::EasingType_::quadraticIn},
{"quadraticOut", Tween::EasingType_::quadraticOut},
{"quadraticInOut", Tween::EasingType_::quadraticInOut},
{"cubicIn", Tween::EasingType_::cubicIn},
{"cubicOut", Tween::EasingType_::cubicOut},
{"cubicInOut", Tween::EasingType_::cubicInOut},
{"quarticIn", Tween::EasingType_::quarticIn},
{"quarticOut", Tween::EasingType_::quarticOut},
{"quarticInOut", Tween::EasingType_::quarticInOut},
{"quinticIn", Tween::EasingType_::quinticIn},
{"quinticOut", Tween::EasingType_::quinticOut},
{"quinticInOut", Tween::EasingType_::quinticInOut},
{"exponentialIn", Tween::EasingType_::exponentialIn},
{"exponentialOut", Tween::EasingType_::exponentialOut},
{"exponentialInOut", Tween::EasingType_::exponentialInOut},
{"circularIn", Tween::EasingType_::circularIn},
{"circularOut", Tween::EasingType_::circularOut},
{"circularInOut", Tween::EasingType_::circularInOut},
{"backIn", Tween::EasingType_::backIn},
{"backOut", Tween::EasingType_::backOut},
{"backInOut", Tween::EasingType_::backInOut},
{"elasticIn", Tween::EasingType_::elasticIn},
{"elasticOut", Tween::EasingType_::elasticOut},
{"elasticInOut", Tween::EasingType_::elasticInOut},
{"bounceIn", Tween::EasingType_::bounceIn},
{"bounceOut", Tween::EasingType_::bounceOut},
{"bounceInOut", Tween::EasingType_::bounceInOut}}
std::map< std::string, Tween::ModeType_ > flatland_plugins::Tween::mode_strings_
static
Initial value:
= {
{"yoyo", Tween::ModeType_::YOYO},
{"loop", Tween::ModeType_::LOOP},
{"once", Tween::ModeType_::ONCE},
{"trigger", Tween::ModeType_::TRIGGER}}

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