![]() |
RobWorkProject
25.2.11-
|
Factory for geometric primitive. More...
#include <GeometryFactory.hpp>
Inherits ExtensionPoint< rw::geometry::GeometryData >.
Public Member Functions | |
GeometryFactory () | |
Constructor. | |
![]() | |
ExtensionPoint (const std::string &id, const std::string &name, Plugin *plugin=NULL) | |
Constructor. More... | |
const std::string & | getId () const |
get unique identifier of this extensionpoint | |
const std::string & | getName () const |
get human readable name of this extension point | |
const rw::core::PropertyMap & | getSchema () const |
the schema describe the possible properties/configurations elements which is used in the PropertyMap. It contain examples of all possible configuration options. This can be used to configure any extensions that needs to attach to this extension point. | |
std::vector< rw::core::Extension::Descriptor > | getExtensionDescriptors () const |
get all extension descriptions of this extension point | |
std::vector< rw::core::Ptr< Extension > > | getExtensions () const |
get all extensions of this extension point | |
Static Public Member Functions | |
static rw::geometry::Geometry::Ptr | load (const std::string &str, bool useCache=true) |
Factory method for geometric primitive. More... | |
static rw::geometry::Geometry::Ptr | getGeometry (const std::string &str, bool useCache=true) |
Factory method for geometric primitive. More... | |
static void | clearGeometryCache () |
Clear the geometry cache. | |
Additional Inherited Members | |
![]() | |
typedef rw::core::Ptr< ExtensionPoint > | Ptr |
smart pointer type of ExtensionPoint | |
![]() | |
rw::core::PropertyMap & | getSchema () |
the schema describe the possible properties/configurations elements which is used in the PropertyMap. The schema property map should just be loaded with all possible configuration options which the extension might use. More... | |
Factory for geometric primitive.
The following primitives are supported
Box: Syntax: "#Box dx dy dz" where "dx, dy, dz" are floats specifying the dimensions
Cylinder: Syntax: "#Cylinder radius height level" where "radius" and "height" are float specifying radius and height and "level" is a non-negative integer specifying the discretization level.
Sphere: Syntax: "#Sphere radi level" where radi is the radius of the sphere
Tube: Syntax: "#Tube radius height level where "radius" and "height" are float specifying radius and height and "level" is a non-negative integer specifying the discretization level.
Cone: Syntax: "#Cone radius height level where "height" is a float specifying cone height, and "radius" is a float specyfying cone radius at at the bottom.
Pyramid: Syntax: "#Pyramid dx dy height" where "dx", "dy" are floats specifying the base dimensions, and "height" is a float specyfying the pyramid height.
Custom: Syntax: "#Custom type parameters where "type" is a custom geometry type provided by extensions, "parameters" is a space separated string with custom geometry parameters.
|
static |
Factory method for geometric primitive.
The Factory takes no ownership of the Geometry objects it constructs and thus returns the geometry by smart pointer.
An exception is thrown if the string cannot be parsed correctly.
str | [in] string to parse |
useCache | [in] set true to return cached geometry if available |
|
static |
Factory method for geometric primitive.
The Factory takes no ownership of the Geometry objects it constructs and thus returns the geometry by smart pointer.
An exception is thrown if the string cannot be parsed correctly.
str | [in] string to parse |
useCache | [in] set true to return cached geometry if available |