Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
DebugRenderer::Geometry Class Reference

A geometry primitive containing triangle batches for various lods. More...

#include <DebugRenderer.h>

Inheritance diagram for DebugRenderer::Geometry:
RefTarget< Geometry >

Public Member Functions

JPH_OVERRIDE_NEW_DELETE Geometry (const AABox &inBounds)
 Constructor. More...
 
 Geometry (const Batch &inBatch, const AABox &inBounds)
 
const LODGetLOD (Vec3Arg inCameraPosition, const AABox &inWorldSpaceBounds, float inLODScaleSq) const
 
- Public Member Functions inherited from RefTarget< Geometry >
 RefTarget ()=default
 Constructor. More...
 
 RefTarget (const RefTarget &)
 
 ~RefTarget ()
 assert no one is referencing us More...
 
void SetEmbedded () const
 
RefTargetoperator= (const RefTarget &)
 Assignment operator. More...
 
uint32 GetRefCount () const
 Get current refcount of this object. More...
 
void AddRef () const
 Add or release a reference to this object. More...
 
void Release () const
 

Public Attributes

Array< LODmLODs
 All level of details for this mesh. More...
 
AABox mBounds
 Bounding box that encapsulates all LODs. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from RefTarget< Geometry >
static int sInternalGetRefCountOffset ()
 INTERNAL HELPER FUNCTION USED BY SERIALIZATION. More...
 
- Protected Attributes inherited from RefTarget< Geometry >
atomic< uint32mRefCount
 Current reference count. More...
 
- Static Protected Attributes inherited from RefTarget< Geometry >
static constexpr uint32 cEmbedded
 A large value that gets added to the refcount to mark the object as embedded. More...
 

Detailed Description

A geometry primitive containing triangle batches for various lods.

Constructor & Destructor Documentation

◆ Geometry() [1/2]

JPH_OVERRIDE_NEW_DELETE DebugRenderer::Geometry::Geometry ( const AABox inBounds)
inline

Constructor.

◆ Geometry() [2/2]

DebugRenderer::Geometry::Geometry ( const Batch inBatch,
const AABox inBounds 
)
inline

Member Function Documentation

◆ GetLOD()

const LOD & DebugRenderer::Geometry::GetLOD ( Vec3Arg  inCameraPosition,
const AABox inWorldSpaceBounds,
float  inLODScaleSq 
) const
inline

Determine which LOD to render

Parameters
inCameraPositionCurrent position of the camera
inWorldSpaceBoundsWorld space bounds for this geometry (transform mBounds by model space matrix)
inLODScaleSqis the squared scale of the model matrix, it is multiplied with the LOD distances in inGeometry to calculate the real LOD distance (so a number > 1 will force a higher LOD).
Returns
The selected LOD.

Member Data Documentation

◆ mBounds

AABox DebugRenderer::Geometry::mBounds

Bounding box that encapsulates all LODs.

◆ mLODs

Array<LOD> DebugRenderer::Geometry::mLODs

All level of details for this mesh.


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