23ObjectParticleSystem::ObjectParticleSystem(
const string&
id,
Model* model,
const Vector3& scale,
bool autoEmit,
bool contributesShadows,
bool receivesShadows, int32_t maxCount,
ParticleEmitter* emitter) :
30 for (
auto object:
objects)
object->setParentEntity(
this);
35 ObjectParticleSystemInternal::fromTransformations(transformations);
41 ObjectParticleSystemInternal::update();
48 if (this->enabled ==
enabled)
return;
62 ObjectParticleSystemInternal::setEnabled(
enabled);
67 ObjectParticleSystemInternal::updateParticles();
79 if (this->frustumCulling ==
true) {
95 ObjectParticleSystemInternal::setAutoEmit(
autoEmit);
102 ObjectParticleSystemInternal::dispose();
110 ObjectParticleSystemInternal::setEngine(
engine);
115 ObjectParticleSystemInternal::setRenderer(
renderer);
void deregisterEntity(Entity *entity)
Removes a entity from internal lists, those entities can also be sub entities from entity hierarchy o...
void registerEntity(Entity *entity)
Adds a entity to internal lists, those entities can also be sub entities from entity hierarchy or par...
Object 3D to be used with engine class.
Object particle system entity to be used with engine class.
void updateParticles() override
Updates the particle entity.
void dispose() override
Dispose this object 3d.
void initialize() override
Initiates this object 3d.
void update() override
Update transformations.
void fromTransformations(const Transformations &transformations) override
Set up this transformations from given transformations.
bool isAutoEmit() override
void setFrustumCulling(bool frustumCulling) override
Set frustum culling.
void setAutoEmit(bool autoEmit) override
Set auto emit.
void setEngine(Engine *engine) override
Set up engine.
void setEnabled(bool enabled) override
Enable/disable rendering.
bool isFrustumCulling() override
void setRenderer(Renderer *renderer) override
Set up renderer.
Representation of a 3d model.
Axis aligned bounding box used for frustum, this is not directly connectable with physics engine.
Particle system which displays objects as particles.
vector< Object3D * > objects
virtual void updateEntity(Entity *entity)=0
Updates a entity.
virtual void addEntity(Entity *entity)=0
Adds a entity.
virtual void removeEntity(Entity *entity)=0
Removes a entity.
Particle emitter interface.