Base class for most physics classes. More...
#include <Base.hh>

Public Types | |
| enum | EntityType { BASE = 0x00000000, ENTITY = 0x00000001, MODEL = 0x00000002, LINK = 0x00000004, COLLISION = 0x00000010, LIGHT = 0x00000020, VISUAL = 0x00000040, JOINT = 0x10000000, BALL_JOINT = 0x10000001, HINGE2_JOINT = 0x10000002, HINGE_JOINT = 0x10000004, SLIDER_JOINT = 0x10000010, SCREW_JOINT = 0x10000020, UNIVERSAL_JOINT = 0x10000040, SHAPE = 0x20000000, BOX_SHAPE = 0x20000001, CYLINDER_SHAPE = 0x20000002, HEIGHTMAP_SHAPE = 0x20000004, MAP_SHAPE = 0x20000010, MULTIRAY_SHAPE = 0x20000020, RAY_SHAPE = 0x20000040, PLANE_SHAPE = 0x20000100, SPHERE_SHAPE = 0x20000200, TRIMESH_SHAPE = 0x20000400 } |
Public Member Functions | |
| Base (BasePtr parent) | |
| Constructor. | |
| virtual | ~Base () |
| Destructor. | |
| virtual void | Load (sdf::ElementPtr &_sdf) |
| Load. | |
| virtual void | Fini () |
| Finialize the object. | |
| virtual void | Init () |
| virtual void | Reset () |
| virtual void | Update () |
| virtual void | UpdateParameters (sdf::ElementPtr &_sdf) |
| Update the parameters using new sdf values. | |
| virtual void | SetName (const std::string &name) |
| Set the name of the entity. | |
| std::string | GetName () const |
| Return the name of the entity. | |
| unsigned int | GetId () const |
| Return the ID of this entity. | |
| void | SetSaveable (bool v) |
| Set whether the object should be "saved", when the user selects to save the world to xml. | |
| bool | GetSaveable () const |
| Get whether the object should be "saved", when the user selects to save the world to xml. | |
| int | GetParentId () const |
| Return the ID of the parent. | |
| void | SetParent (BasePtr parent) |
| Set the parent. | |
| BasePtr | GetParent () const |
| Get the parent. | |
| void | AddChild (BasePtr child) |
| Add a child to this entity. | |
| virtual void | RemoveChild (unsigned int id) |
| Remove a child from this entity. | |
| void | RemoveChildren () |
| Remove all children. | |
| unsigned int | GetChildCount () const |
| Get the number of children. | |
| BasePtr | GetById (unsigned int _id) const |
| Get by id. | |
| BasePtr | GetByName (const std::string &name) |
| Get by name. | |
| BasePtr | GetChild (unsigned int i) const |
| Get a child by index. | |
| BasePtr | GetChild (const std::string &name) |
| Get a child by name. | |
| void | RemoveChild (const std::string &_name) |
| Remove a child by name. | |
| void | AddType (EntityType _type) |
| Add a type specifier. | |
| bool | HasType (const EntityType &_t) const |
| Get the type. | |
| unsigned int | GetType () const |
| Get a type by index. | |
| std::string | GetScopedName () const |
| Return the name of this entity with the model scope model1::...::modelN::entityName. | |
| std::string | GetCompleteScopedName () const |
| Return the name of this entity with the model+body+collision scope model1::...::modelN::bodyN::entityName. | |
| void | Print (std::string prefix) |
| bool | GetShowInGui () const |
| True == show parameters in the gui. | |
| void | SetShowInGui (bool v) |
| True == show parameters in the gui. | |
| virtual bool | SetSelected (bool s) |
| Set whether this entity has been selected by the user through. | |
| bool | IsSelected () const |
| True if the entity is selected by the user. | |
| bool | operator== (const Base &ent) const |
| Returns true if the entities are the same. Checks only the name. | |
| void | SetWorld (const WorldPtr &_newWorld) |
| Set the world this object belongs to. | |
| const WorldPtr & | GetWorld () const |
| Get the world this object is in. | |
| virtual const sdf::ElementPtr & | GetSDF () |
| Get the SDF values for the model. | |
Protected Attributes | |
| sdf::ElementPtr | sdf |
| BasePtr | parent |
| Parent of this entity. | |
| Base_V | children |
| Children of this entity. | |
| Base_V::iterator | childrenEnd |
| WorldPtr | world |
Base class for most physics classes.
| Base | ( | BasePtr | parent | ) |
Constructor.
| parent | Parent of this object |
| void AddChild | ( | BasePtr | child | ) |
Add a child to this entity.
| child | Child entity |
| BasePtr GetByName | ( | const std::string & | name | ) |
Get by name.
| name | Get a child (or self) object by name |
| unsigned int GetChildCount | ( | ) | const |
Get the number of children.
| unsigned int GetId | ( | ) | const |
Return the ID of this entity.
This id is unique
| std::string GetName | ( | ) | const |
Return the name of the entity.
| BasePtr GetParent | ( | ) | const |
| int GetParentId | ( | ) | const |
Return the ID of the parent.
| bool GetSaveable | ( | ) | const |
Get whether the object should be "saved", when the user selects to save the world to xml.
| virtual void Load | ( | sdf::ElementPtr & | _sdf | ) | [virtual] |
Load.
| node | Pointer to an SDF parameters |
Reimplemented in RayShape, Entity, Joint, Model, Link, ScrewJoint< ODEJoint >, MultiRayShape, ODEHinge2Joint, BallJoint< ODEJoint >, ODELink, ODECollision, ODEScrewJoint, Collision, ODEHingeJoint, ODETrimeshShape, Hinge2Joint< ODEJoint >, HeightmapShape, PlaneShape, TrimeshShape, SliderJoint< ODEJoint >, ODEJoint, ODESliderJoint, UniversalJoint< ODEJoint >, HingeJoint< ODEJoint >, SphereShape, BoxShape, and CylinderShape.
| virtual void RemoveChild | ( | unsigned int | id | ) | [virtual] |
Remove a child from this entity.
| child | Child to remove |
| virtual void SetName | ( | const std::string & | name | ) | [virtual] |
| void SetParent | ( | BasePtr | parent | ) |
Set the parent.
| parent | Parent object |
| void SetSaveable | ( | bool | v | ) |
Set whether the object should be "saved", when the user selects to save the world to xml.
| v | Set to True if the object should be saved. |
| void SetWorld | ( | const WorldPtr & | _newWorld | ) |
Set the world this object belongs to.
This will also set the world for all children
1.7.5.1