TinyURDF 1.0.0
A Modern C++ Library for Parsing and Visualizing URDF Model Files
Loading...
Searching...
No Matches
GeometryParser Class Reference

Base parser for geometry shapes, parameterized with a geometry base abstract object. It checks the geometry type and makes the pointer point to a valid geometry structure (e.g., box, sphere, mesh, ...). More...

#include <geometry_parser.h>

Inheritance diagram for GeometryParser:
[legend]
Collaboration diagram for GeometryParser:
[legend]

Public Member Functions

 GeometryParser ()
 
void parse (const tinyxml2::XMLElement *xml) override
 
const char * getTypename () override
 
bool empty () const override
 
void clear () override
 
bool isA (const char *name) override
 
void print (std::ostream &os) override
 
std::shared_ptr< GeometryBaseget () override
 
 ~GeometryParser ()
 
- Public Member Functions inherited from ParserBase< GeometryBase >
const char * getNameOf (const tinyxml2::XMLElement *xml)
 
void parse (const tinyxml2::XMLElement *xml)
 
void parse (const tinyxml2::XMLElement *xml)
 

Additional Inherited Members

- Protected Member Functions inherited from ParserBase< GeometryBase >
 ParserBase ()
 
virtual ~ParserBase ()
 
- Protected Member Functions inherited from ObjectBase
 ObjectBase ()
 
virtual ~ObjectBase ()
 
virtual ObjectBasegetPointer ()
 
- Protected Attributes inherited from ParserBase< GeometryBase >
std::shared_ptr< GeometryBaseTptr
 

Detailed Description

Base parser for geometry shapes, parameterized with a geometry base abstract object. It checks the geometry type and makes the pointer point to a valid geometry structure (e.g., box, sphere, mesh, ...).

<geometry>
<mesh filename="file.stl" scale="0.001 0.001 0.001"/>
<box size="0.531 0.27 0.24"/>
<cylinder length="0.1" radius="0.05"/>
<sphere radius="1.0"/>
</geometry>
Todo:
In further versions, we will support simplified geometry definition in XML as one XML element, given by the following example:
<geometry type="cylinder" radius="1" length="0.5" />

Constructor & Destructor Documentation

◆ GeometryParser()

GeometryParser::GeometryParser ( )

◆ ~GeometryParser()

GeometryParser::~GeometryParser ( )

Member Function Documentation

◆ clear()

void GeometryParser::clear ( )
overridevirtual

Implements ObjectBase.

◆ empty()

bool GeometryParser::empty ( ) const
overridevirtual

Implements ObjectBase.

◆ get()

std::shared_ptr< GeometryBase > GeometryParser::get ( )
overridevirtual

Reimplemented from ParserBase< GeometryBase >.

◆ getTypename()

const char * GeometryParser::getTypename ( )
overridevirtual

Implements ObjectBase.

◆ isA()

bool GeometryParser::isA ( const char *  name)
overridevirtual

Implements ObjectBase.

◆ parse()

void GeometryParser::parse ( const tinyxml2::XMLElement *  xml)
overridevirtual

Reimplemented from ParserBase< GeometryBase >.

◆ print()

void GeometryParser::print ( std::ostream &  os)
overridevirtual

Implements ObjectBase.


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