21ImposterObject3D::ImposterObject3D(
23 const vector<Model*>& billboardModels
26 billboardModels(billboardModels)
71 imposterObjectTransformations.addRotation(
Vector3(0.0f, 1.0f, 0.0f), -(360.0f /
billboardModels.size()) * 0.5f);
73 imposterObjectTransformations.setRotationAngle(
74 imposterObjectTransformations.getRotationCount() - 1,
75 imposterObjectTransformations.getRotationAngle(imposterObjectTransformations.getRotationCount() - 1) + 360.0f /
billboardModels.size()
77 imposterObjectTransformations.update();
89 imposterObjectTransformations.addRotation(
Vector3(0.0f, 1.0f, 0.0f), -(360.0f /
billboardModels.size()) * 0.5f);
91 imposterObjectTransformations.setRotationAngle(
92 imposterObjectTransformations.getRotationCount() - 1,
93 imposterObjectTransformations.getRotationAngle(imposterObjectTransformations.getRotationCount() - 1) + 360.0f /
billboardModels.size()
95 imposterObjectTransformations.update();
105 if (this->enabled ==
enabled)
return;
128 if (this->frustumCulling ==
true) {
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...
Imposter object 3d to be used with engine class.
Object3D * billboardObject
void dispose() override
Dispose this object 3d.
vector< Object3D * > billboardObjects
void initialize() override
Initiates this object 3d.
void update() override
Update transformations.
float distanceShaderDistance
void fromTransformations(const Transformations &transformations) override
Set up this transformations from given transformations.
bool enableEarlyZRejection
void setEnableEarlyZRejection(bool enableEarlyZRejection)
Enable/disable early z rejection.
~ImposterObject3D()
Public destructor.
const Transformations & getTransformations() const override
void setFrustumCulling(bool frustumCulling) override
Set frustum culling.
void setEngine(Engine *engine) override
Set up engine.
void setEnabled(bool enabled) override
Enable/disable rendering.
vector< Model * > billboardModels
bool isFrustumCulling() override
void setRenderer(Renderer *renderer) override
Set up renderer.
Object 3D to be used with engine class.
void dispose() override
Dispose this object 3d.
void setShader(const string &id)
Set shader.
void initialize() override
Initiates this object 3d.
void setRenderPass(RenderPass renderPass) override
Set render pass.
void fromTransformations(const Transformations &transformations) override
Set up this transformations from given transformations.
void setEnableEarlyZRejection(bool enableEarlyZRejection)
Enable/disable early z rejection.
void setDistanceShader(const string &id)
Set distance shader.
void setEngine(Engine *engine) override
Set up engine.
void setDistanceShaderDistance(float distanceShaderDistance)
Set distance shader distance.
void set(const array< float, 4 > &color)
Set up color.
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.