|
candlewick 0.10.0-4-g76c0
A tiny cross-platform renderer based on SDL3
|
A render system for Pinocchio robot geometries using Pinocchio. More...
#include <candlewick/multibody/RobotScene.h>
Classes | |
| struct | Config |
| struct | GBuffer |
| struct | PipelineConfig |
| struct | PipelineKey |
| class | PipelineManager |
Public Types | |
| enum class | PipelineType { PIPELINE_TRIANGLEMESH , PIPELINE_HEIGHTFIELD , PIPELINE_POINTCLOUD } |
| enum | VertexUniformSlots : Uint32 { TRANSFORM , LIGHT_MATRICES } |
| enum | FragmentUniformSlots : Uint32 { MATERIAL , LIGHTING , SSAO_FLAG , ATLAS_INFO } |
| enum | FragmentSamplerSlots { SHADOW_MAP_SLOT , SSAO_SLOT } |
| template<PipelineType T> | |
| using | pipeline_tag = entt::integral_constant<T> |
| using | pipeline_req_t = std::tuple<MeshLayout, PipelineKey> |
Public Member Functions | |
| RobotScene (entt::registry ®istry, const RenderContext &renderer) | |
| Non-initializing constructor. | |
| RobotScene (entt::registry ®istry, const RenderContext &renderer, const pin::GeometryModel &geom_model, const pin::GeometryData &geom_data, Config config) | |
| Constructor which initializes the system. | |
| RobotScene (const RobotScene &)=delete | |
| void | setConfig (const Config &config) |
| void | loadModels (const pin::GeometryModel &geom_model, const pin::GeometryData &geom_data) |
| Set the internal geometry model and data pointers, and load the corresponding models. | |
| void | update () |
| Update the transform component of the GeometryObject entities. | |
| void | collectOpaqueCastables () |
| const std::vector< OpaqueCastable > & | castables () const |
| Uint32 | numLights () const noexcept |
| entt::entity | addEnvironmentObject (MeshData &&data, Mat4f placement, PipelineType pipe_type=PIPELINE_TRIANGLEMESH) |
| entt::entity | addEnvironmentObject (MeshData &&data, const Eigen::Affine3f &T, PipelineType pipe_type=PIPELINE_TRIANGLEMESH) |
| void | clearEnvironment () |
| Destroy all entities with the EnvironmentTag component. | |
| void | clearRobotGeometries () |
| Destroy all entities with the PinGeomObjComponent component (Pinocchio geometry objects). | |
| GraphicsPipeline | createRenderPipeline (const PipelineKey &key, const MeshLayout &layout, SDL_GPUTextureFormat render_target_format, SDL_GPUTextureFormat depth_stencil_format) |
| void | render (CommandBuffer &command_buffer, const Camera &camera) |
| void | renderOpaque (CommandBuffer &command_buffer, const Camera &camera) |
| void | renderTransparent (CommandBuffer &command_buffer, const Camera &camera) |
| void | release () |
| Release all resources. | |
| Config & | config () |
| const Config & | config () const |
| bool | pbrHasPrepass () const |
| bool | shadowsEnabled () const |
| void | ensurePipelinesExist (const std::set< pipeline_req_t > &required_pipelines) |
| Ensure the render pipelines were properly created following the provided requirements. | |
| const pin::GeometryModel & | geomModel () const |
| Getter for the pinocchio GeometryModel object. | |
| const pin::GeometryData & | geomData () const |
| Getter for the pinocchio GeometryData object. | |
| const Device & | device () |
| entt::registry & | registry () |
| const entt::registry & | registry () const |
Static Public Member Functions | |
| static PipelineType | pinGeomToPipeline (const coal::CollisionGeometry &geom) |
| Map hpp-fcl/coal collision geometry to desired pipeline type. | |
| static constexpr SDL_GPUPrimitiveType | getPrimitiveTopologyForType (PipelineType type) |
| Map pipeline type to geometry primitive. | |
Public Attributes | |
| std::array< DirectionalLight, kNumLights > | directionalLight |
| ssao::SsaoPass | ssaoPass {NoInit} |
| struct candlewick::multibody::RobotScene::GBuffer | gBuffer |
| ShadowMapPass | shadowPass {NoInit} |
A render system for Pinocchio robot geometries using Pinocchio.
This internally stores references to pinocchio::GeometryModel and pinocchio::GeometryData objects.
| using candlewick::multibody::RobotScene::pipeline_req_t = std::tuple<MeshLayout, PipelineKey> |
| using candlewick::multibody::RobotScene::pipeline_tag = entt::integral_constant<T> |
| enum candlewick::multibody::RobotScene::FragmentUniformSlots : Uint32 |
|
strong |
| enum candlewick::multibody::RobotScene::VertexUniformSlots : Uint32 |
| candlewick::multibody::RobotScene::RobotScene | ( | entt::registry & | registry, |
| const RenderContext & | renderer ) |
Non-initializing constructor.
| candlewick::multibody::RobotScene::RobotScene | ( | entt::registry & | registry, |
| const RenderContext & | renderer, | ||
| const pin::GeometryModel & | geom_model, | ||
| const pin::GeometryData & | geom_data, | ||
| Config | config ) |
Constructor which initializes the system.
loadModels() will be called.
|
delete |
|
inline |
| entt::entity candlewick::multibody::RobotScene::addEnvironmentObject | ( | MeshData && | data, |
| Mat4f | placement, | ||
| PipelineType | pipe_type = PIPELINE_TRIANGLEMESH ) |
|
inline |
| void candlewick::multibody::RobotScene::clearEnvironment | ( | ) |
Destroy all entities with the EnvironmentTag component.
| void candlewick::multibody::RobotScene::clearRobotGeometries | ( | ) |
Destroy all entities with the PinGeomObjComponent component (Pinocchio geometry objects).
| void candlewick::multibody::RobotScene::collectOpaqueCastables | ( | ) |
|
inline |
|
inline |
| GraphicsPipeline candlewick::multibody::RobotScene::createRenderPipeline | ( | const PipelineKey & | key, |
| const MeshLayout & | layout, | ||
| SDL_GPUTextureFormat | render_target_format, | ||
| SDL_GPUTextureFormat | depth_stencil_format ) |
|
inline |
| void candlewick::multibody::RobotScene::ensurePipelinesExist | ( | const std::set< pipeline_req_t > & | required_pipelines | ) |
Ensure the render pipelines were properly created following the provided requirements.
|
inline |
Getter for the pinocchio GeometryData object.
|
inline |
Getter for the pinocchio GeometryModel object.
|
inlinestaticconstexpr |
Map pipeline type to geometry primitive.
| void candlewick::multibody::RobotScene::loadModels | ( | const pin::GeometryModel & | geom_model, |
| const pin::GeometryData & | geom_data ) |
Set the internal geometry model and data pointers, and load the corresponding models.
|
inlinenoexcept |
|
inline |
|
static |
Map hpp-fcl/coal collision geometry to desired pipeline type.
|
inline |
|
inline |
| void candlewick::multibody::RobotScene::release | ( | ) |
Release all resources.
| void candlewick::multibody::RobotScene::render | ( | CommandBuffer & | command_buffer, |
| const Camera & | camera ) |
| void candlewick::multibody::RobotScene::renderOpaque | ( | CommandBuffer & | command_buffer, |
| const Camera & | camera ) |
| void candlewick::multibody::RobotScene::renderTransparent | ( | CommandBuffer & | command_buffer, |
| const Camera & | camera ) |
|
inline |
|
inline |
| void candlewick::multibody::RobotScene::update | ( | ) |
Update the transform component of the GeometryObject entities.
| std::array<DirectionalLight, kNumLights> candlewick::multibody::RobotScene::directionalLight |
| struct candlewick::multibody::RobotScene::GBuffer candlewick::multibody::RobotScene::gBuffer |
| ShadowMapPass candlewick::multibody::RobotScene::shadowPass {NoInit} |
| ssao::SsaoPass candlewick::multibody::RobotScene::ssaoPass {NoInit} |