DART  6.10.1
dart::utils::MjcfParser::detail::Worldbody Class Referencefinal

#include <Worldbody.hpp>

Public Member Functions

 Worldbody ()=default
 Default constructor. More...
 
std::size_t getNumRootBodies () const
 Returns the number of root <body> elements in <worldbody>. More...
 
const BodygetRootBody (std::size_t index) const
 Returns a root <body> elements at index in <worldbody>. More...
 
std::size_t getNumGeoms () const
 Returns the number of <geom> elements in <worldbody>. More...
 
const GeomgetGeom (std::size_t index) const
 Returns a root <geom> element at index in <worldbody>. More...
 
std::size_t getNumSites () const
 Returns the number of <site> elements in <worldbody>. More...
 
const SitegetSite (std::size_t index) const
 Returns a root <site> element at index in <worldbody>. More...
 

Private Member Functions

Errors read (tinyxml2::XMLElement *element, const common::optional< Size > &size, const Defaults &defaults, const Default *currentDefault, const common::Uri &baseUri, const common::ResourceRetrieverPtr &retriever)
 
Errors preprocess (const Compiler &compiler)
 Updates attributes and elements that doesn't require any other elements. More...
 
Errors compile (const Compiler &compiler)
 Updates attributes and elements that require the preprocessed child elements of this <worldbody>. More...
 
Errors postprocess (const Compiler &compiler)
 Updates attributes and elements that require the compiled parent element. More...
 

Private Attributes

common::optional< std::string > mChildClass
 
std::vector< GeommGeoms
 
std::vector< SitemSites
 
std::vector< BodymRootBodies
 

Friends

class MujocoModel
 

Constructor & Destructor Documentation

◆ Worldbody()

dart::utils::MjcfParser::detail::Worldbody::Worldbody ( )
default

Default constructor.

Member Function Documentation

◆ compile()

Errors dart::utils::MjcfParser::detail::Worldbody::compile ( const Compiler compiler)
private

Updates attributes and elements that require the preprocessed child elements of this <worldbody>.

◆ getGeom()

const Geom & dart::utils::MjcfParser::detail::Worldbody::getGeom ( std::size_t  index) const

Returns a root <geom> element at index in <worldbody>.

◆ getNumGeoms()

std::size_t dart::utils::MjcfParser::detail::Worldbody::getNumGeoms ( ) const

Returns the number of <geom> elements in <worldbody>.

◆ getNumRootBodies()

std::size_t dart::utils::MjcfParser::detail::Worldbody::getNumRootBodies ( ) const

Returns the number of root <body> elements in <worldbody>.

◆ getNumSites()

std::size_t dart::utils::MjcfParser::detail::Worldbody::getNumSites ( ) const

Returns the number of <site> elements in <worldbody>.

◆ getRootBody()

const Body & dart::utils::MjcfParser::detail::Worldbody::getRootBody ( std::size_t  index) const

Returns a root <body> elements at index in <worldbody>.

◆ getSite()

const Site & dart::utils::MjcfParser::detail::Worldbody::getSite ( std::size_t  index) const

Returns a root <site> element at index in <worldbody>.

◆ postprocess()

Errors dart::utils::MjcfParser::detail::Worldbody::postprocess ( const Compiler compiler)
private

Updates attributes and elements that require the compiled parent element.

◆ preprocess()

Errors dart::utils::MjcfParser::detail::Worldbody::preprocess ( const Compiler compiler)
private

Updates attributes and elements that doesn't require any other elements.

◆ read()

Errors dart::utils::MjcfParser::detail::Worldbody::read ( tinyxml2::XMLElement *  element,
const common::optional< Size > &  size,
const Defaults defaults,
const Default currentDefault,
const common::Uri baseUri,
const common::ResourceRetrieverPtr retriever 
)
private

Friends And Related Function Documentation

◆ MujocoModel

friend class MujocoModel
friend

Member Data Documentation

◆ mChildClass

common::optional<std::string> dart::utils::MjcfParser::detail::Worldbody::mChildClass
private

◆ mGeoms

std::vector<Geom> dart::utils::MjcfParser::detail::Worldbody::mGeoms
private

◆ mRootBodies

std::vector<Body> dart::utils::MjcfParser::detail::Worldbody::mRootBodies
private

◆ mSites

std::vector<Site> dart::utils::MjcfParser::detail::Worldbody::mSites
private