10 #include <mrpt/img/TColor.h> 20 using namespace mvsim;
30 0.5 * diameter, 0.5 * diameter, this->
width, 15);
31 gl_wheel->setColor_u8(
color);
35 auto gl_wheel_frame = mrpt::opengl::CSetOfObjects::Create();
36 gl_wheel_frame->insert(gl_wheel);
38 mrpt::opengl::CSetOfObjects::Ptr gl_xyz =
40 gl_wheel_frame->insert(gl_xyz);
45 obj.
insert(gl_wheel_frame);
58 if (attr && attr->
value())
60 const std::string sAttr = attr->
value();
69 const double INERTIA_NOT_SET = -1.;
70 this->Iyy = INERTIA_NOT_SET;
75 if (Iyy == INERTIA_NOT_SET) this->recalcInertia();
82 Iyy = mass * (0.25 * diameter * diameter) * 0.5;
This file contains rapidxml parser and DOM implementation.
GLint GLint GLint GLint GLint GLint y
void recalcInertia()
Recompute Iyy from mass, diameter and height.
void loadFromXML(const rapidxml::xml_node< char > *xml_node)
void getAs3DObject(mrpt::opengl::CSetOfObjects &obj)
void parse_xmlnode_attribs(const rapidxml::xml_node< char > &xml_node, const TParameterDefinitions ¶ms, const std::map< std::string, std::string > &variableNamesValues={}, const char *functionNameContext="")
CSetOfObjectsPtr OPENGL_IMPEXP CornerXYZSimple(float scale=1.0, float lineWidth=1.0)
GLint GLint GLint GLint GLint x
xml_attribute< Ch > * first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
CRenderizable & setPose(const mrpt::poses::CPose3D &o)
static CCylinderPtr Create(const float baseRadius, const float topRadius, const float height=1, const int slices=10, const int stacks=10)
GLint GLint GLint GLint GLint GLint GLsizei width
void insert(const CRenderizablePtr &newObject)
mrpt::math::TPose2D parseXYPHI(const std::string &s, bool allow_missing_angle=false, double default_angle_radians=0.0)