Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::Particle::IRenderer Class Referenceabstract

Base interface for particle renderers. More...

#include <ParticleSystem/Particles/Renderers/IRenderer.h>

Inheritance diagram for Skylicht::Particle::IRenderer:
Skylicht::Particle::CParticleSerializable Skylicht::Particle::CCPURenderer Skylicht::Particle::CMeshParticleRenderer Skylicht::Particle::CQuadRenderer

Public Member Functions

 IRenderer (ERenderer type)
ERenderer getType ()
 Gets renderer type enum.
CMaterialgetMaterial ()
 Gets active material (custom or default).
CMaterialgetDefaultMaterial ()
 Gets default internal material.
CMaterialgetCustomMaterial ()
 Gets custom material if set.
void setTexturePath (const char *path)
 Loads and sets the main texture.
void setTexture (int slot, ITexture *texture)
 Sets texture for a specific slot.
void setEmission (bool b)
 Enables/disables emission.
bool isEmission ()
 Checks emission status.
bool useInstancing ()
 Checks instancing support.
void setEmissionIntensity (float b)
 Sets emission intensity.
float getEmissionIntensity ()
 Gets emission intensity.
bool needUpdateMesh ()
 Checks if internal mesh requires rebuilding.
const wchar_t * getName ()
 Gets display name.
virtual CObjectSerializablecreateSerializable ()
 Creates a serializable object for property editing or saving.
virtual void loadSerializable (CObjectSerializable *object)
 Loads properties from a serializable object.
virtual void getParticleBuffer (IMeshBuffer *buffer)=0
 Implementation: fills the mesh buffer with renderer-specific geometry.
void setAtlas (u32 x, u32 y)
 Configures texture atlas dimensions.
u32 getAtlasX ()
 Gets atlas column count.
u32 getAtlasY ()
 Gets atlas row count.
u32 getTotalFrames ()
 Gets total frames in atlas.
float getFrameWidth ()
 Gets UV width of a single frame.
float getFrameHeight ()
 Gets UV height of a single frame.

Public Attributes

float SizeX
 Default base scale X.
float SizeY
 Default base scale Y.
float SizeZ
 Default base scale Z.

Protected Attributes

ERenderer m_type
 Type of the renderer.
CMaterialm_material
 Default material for the particles.
CMaterialm_customMaterial
 Optional custom material.
bool m_useCustomMaterial
 Whether custom material is enabled.
bool m_useInstancing
 Whether this renderer uses hardware instancing.
bool m_emission
 Whether the particles have emission.
bool m_ztest
 Depth test flag.
float m_emissionIntensity
 Emission intensity multiplier.
std::string m_texturePath
 Primary texture path.
u32 m_atlasNx
 Atlas horizontal frame count.
u32 m_atlasNy
 Atlas vertical frame count.
std::string m_materialPath
 Path to custom material file.
bool m_needUpdateMesh
 Internal: flag to trigger mesh buffer updates.

Detailed Description

Base interface for particle renderers.

Implementations define the visual shape of particles and how they are submitted to the GPU.

Member Function Documentation

◆ createSerializable()

virtual CObjectSerializable * Skylicht::Particle::IRenderer::createSerializable ( )
virtual

Creates a serializable object for property editing or saving.

Returns
Pointer to a new CObjectSerializable instance.

Reimplemented from Skylicht::Particle::CParticleSerializable.

Reimplemented in Skylicht::Particle::CCPURenderer, Skylicht::Particle::CMeshParticleRenderer, and Skylicht::Particle::CQuadRenderer.

◆ getParticleBuffer()

virtual void Skylicht::Particle::IRenderer::getParticleBuffer ( IMeshBuffer * buffer)
pure virtual

Implementation: fills the mesh buffer with renderer-specific geometry.

Implemented in Skylicht::Particle::CCPURenderer, Skylicht::Particle::CMeshParticleRenderer, and Skylicht::Particle::CQuadRenderer.

◆ loadSerializable()

virtual void Skylicht::Particle::IRenderer::loadSerializable ( CObjectSerializable * object)
virtual

Loads properties from a serializable object.

Parameters
objectThe serializable data to load.

Reimplemented from Skylicht::Particle::CParticleSerializable.

Reimplemented in Skylicht::Particle::CCPURenderer, Skylicht::Particle::CMeshParticleRenderer, and Skylicht::Particle::CQuadRenderer.


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