ezEngine Release 26.3
Loading...
Searching...
No Matches
ezParticleTypeMesh Class Referencefinal

#include <ParticleTypeMesh.h>

Inheritance diagram for ezParticleTypeMesh:

Public Member Functions

virtual void CreateRequiredStreams () override
 
virtual void ExtractTypeRenderData (ezMsgExtractRenderData &ref_msg, const ezTransform &instanceTransform) const override
 
- Public Member Functions inherited from ezParticleType
virtual float GetMaxParticleRadius (float fParticleSize) const
 
- Public Member Functions inherited from ezParticleModule
virtual void QueryOptionalStreams ()
 
void Reset (ezParticleSystemInstance *pOwner)
 
virtual void OnFinalize ()
 Called after everything is set up.
 
ezParticleSystemInstanceGetOwnerSystem ()
 
const ezParticleSystemInstanceGetOwnerSystem () const
 
ezParticleEffectInstanceGetOwnerEffect () const
 
- Public Member Functions inherited from ezProcessingStreamProcessor
 ezProcessingStreamProcessor ()
 Base constructor.
 
virtual ~ezProcessingStreamProcessor ()
 Base destructor.
 
- Public Member Functions inherited from ezReflectedClass
virtual const ezRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const ezRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
EZ_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Public Attributes

ezMeshResourceHandle m_hMesh
 
ezMaterialResourceHandle m_hMaterial
 
float m_fScale = 1.0f
 
ezTempHashedString m_sTintColorParameter
 
- Public Attributes inherited from ezProcessingStreamProcessor
float m_fPriority = 0.0f
 Used for sorting processors, to ensure a certain order. Lower priority == executed first.
 

Protected Member Functions

virtual void InitializeElements (ezUInt64 uiStartIndex, ezUInt64 uiNumElements) override
 This method needs to be implemented in order to initialize new elements to specific values.
 
virtual void Process (ezUInt64 uiNumElements) override
 The actual method which processes the data, will be called with the number of elements to process.
 
bool QueryMeshAndMaterialInfo () const
 Queries and caches mesh and material information from resources.
 
void RequestRequiredWorldModulesForCache (ezParticleWorldModule *pParticleModule) override
 
- Protected Member Functions inherited from ezParticleType
virtual void StepParticleSystem (const ezTime &tDiff, ezUInt32 uiNumNewParticles)
 
- Protected Member Functions inherited from ezParticleModule
virtual void OnReset ()
 Called by Reset() to perform custom cleanup.
 
void CreateStream (const char *szName, ezProcessingStream::DataType Type, ezProcessingStream **ppStream, bool bWillInitializeStream)
 
virtual ezResult UpdateStreamBindings () final override
 Internal method which needs to be implemented, gets the concrete stream bindings. This is called every time the streams are resized. Implementations should check that their required streams exist and are of the correct data types.
 
ezRandomGetRNG () const
 

Protected Attributes

ezRenderDataManagerm_pRenderDataManager = nullptr
 
ezProcessingStreamm_pStreamPosition = nullptr
 
ezProcessingStreamm_pStreamSize = nullptr
 
ezProcessingStreamm_pStreamColor = nullptr
 
ezProcessingStreamm_pStreamRotationSpeed = nullptr
 
ezProcessingStreamm_pStreamRotationOffset = nullptr
 
ezProcessingStreamm_pStreamAxis = nullptr
 
ezProcessingStreamm_pStreamVariation = nullptr
 
bool m_bRenderDataCached = false
 
ezRenderData::Category m_RenderCategory
 
ezInstanceDataOffset m_InstanceDataOffset
 
ezUInt8 m_uiNumSubMeshes = 0
 
ezDynamicArray< ezMaterialResourceHandlem_CachedSubMeshMaterials
 
bool m_bMaterialOverride = false
 
- Protected Attributes inherited from ezParticleType
ezTime m_TimeDiff
 
ezUInt64 m_uiLastExtractedFrame
 
- Protected Attributes inherited from ezProcessingStreamProcessor
ezProcessingStreamGroupm_pStreamGroup = nullptr
 Back pointer to the stream group - will be set to the owner stream group when adding the stream processor to the group. Can be used to get stream pointers in UpdateStreamBindings();.
 

Friends

class ezParticleTypeMeshFactory
 

Additional Inherited Members

- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
 
- Static Protected Member Functions inherited from ezParticleType
static ezUInt32 ComputeSortingKey (ezParticleTypeRenderMode::Enum mode, ezUInt64 uiResource1Hash, ezUInt64 uiResource2Hash)
 

Detailed Description

Renders particles as instanced 3D meshes.

Each particle renders a full 3D mesh at its position, oriented according to its rotation axis. Materials can be overridden globally or use the mesh's default materials. Uses instanced rendering for performance when many particles share the same mesh.

Member Function Documentation

◆ CreateRequiredStreams()

void ezParticleTypeMesh::CreateRequiredStreams ( )
overridevirtual

Implements ezParticleModule.

◆ ExtractTypeRenderData()

void ezParticleTypeMesh::ExtractTypeRenderData ( ezMsgExtractRenderData ref_msg,
const ezTransform instanceTransform 
) const
overridevirtual

Generates render data for all active particles.

Called during render data extraction to create render objects for this particle type.

Implements ezParticleType.

◆ InitializeElements()

void ezParticleTypeMesh::InitializeElements ( ezUInt64  uiStartIndex,
ezUInt64  uiNumElements 
)
overrideprotectedvirtual

This method needs to be implemented in order to initialize new elements to specific values.

Reimplemented from ezParticleType.

◆ Process()

virtual void ezParticleTypeMesh::Process ( ezUInt64  uiNumElements)
inlineoverrideprotectedvirtual

The actual method which processes the data, will be called with the number of elements to process.

Implements ezProcessingStreamProcessor.

◆ RequestRequiredWorldModulesForCache()

void ezParticleTypeMesh::RequestRequiredWorldModulesForCache ( ezParticleWorldModule pParticleModule)
overrideprotectedvirtual

Override this to cache world module pointers for later access.

Cached modules can be retrieved via ezParticleWorldModule::GetCachedWorldModule().

Reimplemented from ezParticleModule.


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