Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::CookedResourceCollection Class Reference

Provides thread-safe cooked data creation and storage. All methods are thread-safe to call, however manipulating the created data is not thread-safe unless stated explicitly. More...

#include <CookedResourceCollection.h>

Inheritance diagram for ph::CookedResourceCollection:
ph::CookedResourceCollectionBase ph::INoCopyAndMove

Public Member Functions

std::string getStats () const override
 
template<typename... DeducedArgs>
PrimitiveMetadatamakeMetadata (DeducedArgs &&... args)
 
template<CDerived< math::Transform > TransformType, typename... DeducedArgs>
TransformType * makeTransform (DeducedArgs &&... args)
 
template<CDerived< Intersectable > IntersectableType, typename... DeducedArgs>
IntersectableType * makeIntersectable (DeducedArgs &&... args)
 
template<CDerived< Intersectable > IntersectableType>
IntersectableType * copyIntersectable (IntersectableType intersectable)
 
template<CDerived< Emitter > EmitterType, typename... DeducedArgs>
EmitterType * makeEmitter (DeducedArgs &&... args)
 
template<typename... DeducedArgs>
IndexedTriangleBuffermakeTriangleBuffer (DeducedArgs &&... args)
 
template<typename... DeducedArgs>
CookedGeometrymakeGeometry (const SdlResourceId id, DeducedArgs &&... args)
 
template<typename... DeducedArgs>
CookedMotionmakeMotion (const SdlResourceId id, DeducedArgs &&... args)
 
TSynchronized< CookedNamedResource > & getNamed ()
 Get the named resource sub-storage.
 
const CookedGeometrygetGeometry (const SdlResourceId id) const
 
const CookedMotiongetMotion (const SdlResourceId id) const
 
- Public Member Functions inherited from ph::CookedResourceCollectionBase
virtual ~CookedResourceCollectionBase ()=default
 

Additional Inherited Members

- Protected Types inherited from ph::CookedResourceCollectionBase
template<typename CookedType >
using TSdlResourceIdMap = std::unordered_map<SdlResourceId, std::unique_ptr<CookedType>>
 
- Static Protected Member Functions inherited from ph::CookedResourceCollectionBase
template<typename DerivedType , typename BaseType , typename... DeducedArgs>
static DerivedType * makeCookedResource (TSynchronized< TUniquePtrVector< BaseType > > &syncedResources, DeducedArgs &&... args)
 
template<typename CookedType , typename... DeducedArgs>
static CookedType * makeCookedResourceWithID (TSynchronized< TSdlResourceIdMap< CookedType > > &syncedIdToResource, const SdlResourceId id, DeducedArgs &&... args)
 
template<typename CookedType , typename... DeducedArgs>
static const CookedType * getCookedResourceByID (const TSynchronized< TSdlResourceIdMap< CookedType > > &syncedIdToResource, const SdlResourceId id)
 

Detailed Description

Provides thread-safe cooked data creation and storage. All methods are thread-safe to call, however manipulating the created data is not thread-safe unless stated explicitly.

Member Function Documentation

◆ copyIntersectable()

template<CDerived< Intersectable > IntersectableType>
IntersectableType * ph::CookedResourceCollection::copyIntersectable ( IntersectableType intersectable)
inlinenodiscard

◆ getGeometry()

const CookedGeometry * ph::CookedResourceCollection::getGeometry ( const SdlResourceId id) const

◆ getMotion()

const CookedMotion * ph::CookedResourceCollection::getMotion ( const SdlResourceId id) const

◆ getNamed()

TSynchronized< CookedNamedResource > & ph::CookedResourceCollection::getNamed ( )

Get the named resource sub-storage.

Returns
A thread-safe storage.

◆ getStats()

std::string ph::CookedResourceCollection::getStats ( ) const
overridevirtual

◆ makeEmitter()

template<CDerived< Emitter > EmitterType, typename... DeducedArgs>
EmitterType * ph::CookedResourceCollection::makeEmitter ( DeducedArgs &&... args)
inlinenodiscard

◆ makeGeometry()

template<typename... DeducedArgs>
CookedGeometry * ph::CookedResourceCollection::makeGeometry ( const SdlResourceId id,
DeducedArgs &&... args )
inline

◆ makeIntersectable()

template<CDerived< Intersectable > IntersectableType, typename... DeducedArgs>
IntersectableType * ph::CookedResourceCollection::makeIntersectable ( DeducedArgs &&... args)
inlinenodiscard

◆ makeMetadata()

template<typename... DeducedArgs>
PrimitiveMetadata * ph::CookedResourceCollection::makeMetadata ( DeducedArgs &&... args)
inlinenodiscard

◆ makeMotion()

template<typename... DeducedArgs>
CookedMotion * ph::CookedResourceCollection::makeMotion ( const SdlResourceId id,
DeducedArgs &&... args )
inline

◆ makeTransform()

template<CDerived< math::Transform > TransformType, typename... DeducedArgs>
TransformType * ph::CookedResourceCollection::makeTransform ( DeducedArgs &&... args)
inlinenodiscard

◆ makeTriangleBuffer()

template<typename... DeducedArgs>
IndexedTriangleBuffer * ph::CookedResourceCollection::makeTriangleBuffer ( DeducedArgs &&... args)
inlinenodiscard

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