Kemena3D
Loading...
Searching...
No Matches
kemena::kParticle Struct Reference

Data descriptor for a single particle system attached to a scene object. More...

#include <kparticle.h>

Public Attributes

kString uuid
 Unique identifier for this particle system.
kString name = "Particle System"
 Human-readable display name.
bool isActive = true
 Whether this system emits/simulates particles.
bool looping = true
 Whether emission restarts after one cycle.
int maxParticles = 100
 Maximum number of live particles at once.
float emissionRate = 10.0f
 Particles spawned per second.
float lifetime = 2.0f
 Each particle's lifespan in seconds.
float gravityScale = 1.0f
 Multiplier applied to gravity acting on particles.
kVec3 startVelocity = kVec3(0.0f, 1.0f, 0.0f)
 Base initial velocity direction/magnitude.
float startSpeed = 1.0f
 Scalar speed applied to the start velocity.
kVec3 velocityVariance = kVec3(0.1f, 0.1f, 0.1f)
 Per-axis random spread added to start velocity.
kVec4 colorStart = kVec4(1.0f, 1.0f, 1.0f, 1.0f)
 Particle color (RGBA) at birth.
kVec4 colorEnd = kVec4(1.0f, 1.0f, 1.0f, 0.0f)
 Particle color (RGBA) at death.
float sizeStart = 0.1f
 Particle size at birth.
float sizeEnd = 0.0f
 Particle size at death.

Detailed Description

Data descriptor for a single particle system attached to a scene object.

Store instances in kObject via addParticle() / removeParticle(). At game-start the runtime reads these descriptors and spawns live emitters.

Member Data Documentation

◆ colorEnd

kVec4 kemena::kParticle::colorEnd = kVec4(1.0f, 1.0f, 1.0f, 0.0f)

Particle color (RGBA) at death.

◆ colorStart

kVec4 kemena::kParticle::colorStart = kVec4(1.0f, 1.0f, 1.0f, 1.0f)

Particle color (RGBA) at birth.

◆ emissionRate

float kemena::kParticle::emissionRate = 10.0f

Particles spawned per second.

◆ gravityScale

float kemena::kParticle::gravityScale = 1.0f

Multiplier applied to gravity acting on particles.

◆ isActive

bool kemena::kParticle::isActive = true

Whether this system emits/simulates particles.

◆ lifetime

float kemena::kParticle::lifetime = 2.0f

Each particle's lifespan in seconds.

◆ looping

bool kemena::kParticle::looping = true

Whether emission restarts after one cycle.

◆ maxParticles

int kemena::kParticle::maxParticles = 100

Maximum number of live particles at once.

◆ name

kString kemena::kParticle::name = "Particle System"

Human-readable display name.

◆ sizeEnd

float kemena::kParticle::sizeEnd = 0.0f

Particle size at death.

◆ sizeStart

float kemena::kParticle::sizeStart = 0.1f

Particle size at birth.

◆ startSpeed

float kemena::kParticle::startSpeed = 1.0f

Scalar speed applied to the start velocity.

◆ startVelocity

kVec3 kemena::kParticle::startVelocity = kVec3(0.0f, 1.0f, 0.0f)

Base initial velocity direction/magnitude.

◆ uuid

kString kemena::kParticle::uuid

Unique identifier for this particle system.

◆ velocityVariance

kVec3 kemena::kParticle::velocityVariance = kVec3(0.1f, 0.1f, 0.1f)

Per-axis random spread added to start velocity.


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