Drake
RenderEngineGl Class Referencefinal

Detailed Description

See documentation of MakeRenderEngineGl().

#include <drake/geometry/render/gl_renderer/render_engine_gl.h>

Public Member Functions

 RenderEngineGl (RenderEngineGlParams params={})
 Construct an instance of the render engine with the given params. More...
 
 ~RenderEngineGl () final
 
void UpdateViewpoint (const math::RigidTransformd &X_WR) final
 
const RenderEngineGlParamsparameters () const
 
Does not allow public copy, move, or assignment
 RenderEngineGl (const RenderEngineGl &)=delete
 
RenderEngineGloperator= (const RenderEngineGl &)=delete
 
 RenderEngineGl (RenderEngineGl &&)=delete
 
RenderEngineGloperator= (RenderEngineGl &&)=delete
 
Shape reification
void ImplementGeometry (const Sphere &sphere, void *user_data) final
 
void ImplementGeometry (const Cylinder &cylinder, void *user_data) final
 
void ImplementGeometry (const HalfSpace &half_space, void *user_data) final
 
void ImplementGeometry (const Box &box, void *user_data) final
 
void ImplementGeometry (const Capsule &capsule, void *user_data) final
 
void ImplementGeometry (const Ellipsoid &ellipsoid, void *user_data) final
 
void ImplementGeometry (const Mesh &mesh, void *user_data) final
 
void ImplementGeometry (const Convex &convex, void *user_data) final
 
- Public Member Functions inherited from RenderEngine
 RenderEngine (const RenderLabel &default_label=RenderLabel::kUnspecified)
 Constructs a RenderEngine with the given default render label. More...
 
virtual ~RenderEngine ()=default
 
std::unique_ptr< RenderEngineClone () const
 Clones the render engine – making the RenderEngine compatible with copyable_unique_ptr. More...
 
bool RegisterVisual (GeometryId id, const Shape &shape, const PerceptionProperties &properties, const math::RigidTransformd &X_WG, bool needs_updates=true)
 Requests registration of the given shape with this render engine. More...
 
bool RemoveGeometry (GeometryId id)
 Removes the geometry indicated by the given id from the engine. More...
 
bool has_geometry (GeometryId id) const
 Reports true if a geometry with the given id has been registered with this engine. More...
 
template<typename T >
void UpdatePoses (const std::unordered_map< GeometryId, math::RigidTransform< T >> &X_WGs)
 Updates the poses of all geometries marked as "needing update" (see RegisterVisual()). More...
 
RenderLabel default_render_label () const
 Reports the render label value this render engine has been configured to use. More...
 
void RenderColorImage (const ColorRenderCamera &camera, systems::sensors::ImageRgba8U *color_image_out) const
 Renders the registered geometry into the given color (rgb) image based on a fully specified camera. More...
 
void RenderDepthImage (const DepthRenderCamera &camera, systems::sensors::ImageDepth32F *depth_image_out) const
 Renders the registered geometry into the given depth image based on a fully specified camera. More...
 
void RenderLabelImage (const ColorRenderCamera &camera, systems::sensors::ImageLabel16I *label_image_out) const
 Renders the registered geometry into the given label image based on a fully specified camera. More...
 
- Public Member Functions inherited from ShapeReifier
virtual ~ShapeReifier ()=default
 
virtual void ImplementGeometry (const MeshcatCone &cone, void *user_data)
 

Friends

class RenderEngineGlTester
 

Additional Inherited Members

- Protected Member Functions inherited from RenderEngine
RenderLabel GetRenderLabelOrThrow (const PerceptionProperties &properties) const
 Extracts the (label, id) RenderLabel property from the given properties and validates it (or the configured default if no such property is defined). More...
 
 RenderEngine (const RenderEngine &)=default
 
RenderEngineoperator= (const RenderEngine &)=default
 
 RenderEngine (RenderEngine &&)=default
 
RenderEngineoperator= (RenderEngine &&)=default
 
- Protected Member Functions inherited from ShapeReifier
 ShapeReifier ()=default
 
virtual void ThrowUnsupportedGeometry (const std::string &shape_name)
 Derived ShapeReifiers can replace the default message for unsupported geometries by overriding this method. More...
 
 ShapeReifier (const ShapeReifier &)=default
 
ShapeReifieroperator= (const ShapeReifier &)=default
 
 ShapeReifier (ShapeReifier &&)=default
 
ShapeReifieroperator= (ShapeReifier &&)=default
 
- Static Protected Member Functions inherited from RenderEngine
template<typename ImageType >
static void ThrowIfInvalid (const systems::sensors::CameraInfo &intrinsics, const ImageType *image, const char *image_type)
 
static RenderLabel LabelFromColor (const systems::sensors::ColorI &color)
 Transforms the given byte-valued RGB color value into its corresponding RenderLabel. More...
 
static systems::sensors::ColorI GetColorIFromLabel (const RenderLabel &label)
 Transforms this render label into a byte-valued RGB color. More...
 
static systems::sensors::ColorD GetColorDFromLabel (const RenderLabel &label)
 Transforms this render label into a double-valued RGB color. More...
 

Constructor & Destructor Documentation

◆ RenderEngineGl() [1/3]

RenderEngineGl ( const RenderEngineGl )
delete

◆ RenderEngineGl() [2/3]

RenderEngineGl ( RenderEngineGl &&  )
delete

◆ RenderEngineGl() [3/3]

RenderEngineGl ( RenderEngineGlParams  params = {})
explicit

Construct an instance of the render engine with the given params.

◆ ~RenderEngineGl()

~RenderEngineGl ( )
final

Member Function Documentation

◆ ImplementGeometry() [1/8]

void ImplementGeometry ( const Sphere sphere,
void *  user_data 
)
finalvirtual

Reimplemented from ShapeReifier.

◆ ImplementGeometry() [2/8]

void ImplementGeometry ( const Cylinder cylinder,
void *  user_data 
)
finalvirtual

Reimplemented from ShapeReifier.

◆ ImplementGeometry() [3/8]

void ImplementGeometry ( const HalfSpace half_space,
void *  user_data 
)
finalvirtual

Reimplemented from ShapeReifier.

◆ ImplementGeometry() [4/8]

void ImplementGeometry ( const Box box,
void *  user_data 
)
finalvirtual

Reimplemented from ShapeReifier.

◆ ImplementGeometry() [5/8]

void ImplementGeometry ( const Capsule capsule,
void *  user_data 
)
finalvirtual

Reimplemented from ShapeReifier.

◆ ImplementGeometry() [6/8]

void ImplementGeometry ( const Ellipsoid ellipsoid,
void *  user_data 
)
finalvirtual

Reimplemented from ShapeReifier.

◆ ImplementGeometry() [7/8]

void ImplementGeometry ( const Mesh mesh,
void *  user_data 
)
finalvirtual

Reimplemented from ShapeReifier.

◆ ImplementGeometry() [8/8]

void ImplementGeometry ( const Convex convex,
void *  user_data 
)
finalvirtual

Reimplemented from ShapeReifier.

◆ operator=() [1/2]

RenderEngineGl& operator= ( const RenderEngineGl )
delete

◆ operator=() [2/2]

RenderEngineGl& operator= ( RenderEngineGl &&  )
delete

◆ parameters()

const RenderEngineGlParams& parameters ( ) const

◆ UpdateViewpoint()

void UpdateViewpoint ( const math::RigidTransformd &  X_WR)
finalvirtual

Friends And Related Function Documentation

◆ RenderEngineGlTester

friend class RenderEngineGlTester
friend

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