Lysa  0.0
Lysa 3D Engine
PhysicsDebugRenderer Class Reference

Detailed Description

Renderer for physics debugging

+ Inheritance diagram for PhysicsDebugRenderer:

Public Member Functions

 PhysicsDebugRenderer (const DebugConfiguration &config, const RendererConfiguration &renderingConfiguration, vireo::ImageFormat outputFormat)
 
void drawRayCasts (const std::unordered_set< const RayCast * > &raycasts, const float4 &rayColor, const float4 &collidingRayColor)
 
const auto & getConfiguration () const
 
- Public Member Functions inherited from Vector3DRenderer
 Vector3DRenderer (const RendererConfiguration &config, vireo::ImageFormat outputFormat, bool useCamera=true, bool depthTestEnable=true, bool filledTriangles=false, bool enableAlphaBlending=true, const std::string &name="VectorRenderer", const std::string &shadersName="vector", const std::string &glyphShadersName="glyph")
 
bool isUseCamera () const
 
unique_id beginDraw (unique_id sessionId=INVALID_ID)
 
void endDraw ()
 
void setVisible (unique_id sessionId, bool visible)
 
void clearSession (unique_id sessionId)
 
void restart ()
 
void drawLine (const float3 &from, const float3 &to, const float4 &color)
 
void drawTriangle (const float3 &v1, const float3 &v2, const float3 &v3, const float4 &color)
 
void drawImage (unique_id imageId, const float3 &position, const quaternion &rotation, const float2 &size, const float4 &color)
 
void drawText (const std::string &text, Font &font, float fontScale, const float3 &position, const quaternion &rotation, const float4 &innerColor, TextAlignment alignment=TextAlignment::LEFT, bool rotationGlobal=false)
 
void drawSpline (const std::vector< float3 > &points, const float4 &color, uint32 segsPerSpan=16, float tension=0.0f)
 
void update (const std::shared_ptr< vireo::CommandList > &commandList, uint32 frameIndex)
 
void resize (const vireo::Extent &extent)
 
void render (const std::shared_ptr< vireo::CommandList > &commandList, const Camera &camera, const std::shared_ptr< vireo::RenderTarget > &colorAttachment, const std::shared_ptr< vireo::RenderTarget > &depthAttachment, uint32 frameIndex)
 
void setGammaCorrectionParameters (const float gamma, const float _)
 
virtual ~Vector3DRenderer ()
 
 Vector3DRenderer (Vector3DRenderer &) = delete
 
Vector3DRenderer & operator= (Vector3DRenderer &) = delete
 

Additional Inherited Members

- Protected Member Functions inherited from Vector3DRenderer
void commitPrimitive (DrawPrimType type, uint32 vertexCount)
 
int32 addImage (const Image &texture)
 
int32 addFontAtlas (const Image &texture)
 
int32 addFont (Font &font)
 
- Protected Attributes inherited from Vector3DRenderer
const std::string name
 
const size_t maxVertices
 
const size_t maxParams
 
const size_t maxImages
 
const size_t maxFonts
 
ImageManagerimageManager
 
const RendererConfigurationconfig
 
float aspectRatio {}
 
std::vector< Vertexvertices
 
uint32 nextVertexOffset {0}
 
std::vector< DrawParamparams
 
uint32 nextParamOffset {0}
 
uint32 lineListCount {0}
 
uint32 lineStripCount {0}
 
uint32 triPlainCount {0}
 
uint32 triImageCount {0}
 
uint32 triGlyphCount {0}
 
std::optional< DrawSessioncurrentSession
 

Constructor & Destructor Documentation

PhysicsDebugRenderer ( const DebugConfiguration &  config,
const RendererConfiguration renderingConfiguration,
vireo::ImageFormat  outputFormat 
)

Constructor

Parameters
configDebug configuration
renderingConfigurationRendering configuration
outputFormatOutput image format

Member Function Documentation

void drawRayCasts ( const std::unordered_set< const RayCast * > &  raycasts,
const float4 &  rayColor,
const float4 &  collidingRayColor 
)
const auto& getConfiguration ( ) const
inline

Get the debug configuration