19LODObject3D::LODObject3D(
23 float modelLOD2MinDistance,
26 float modelLOD3MinDistance,
28 float lodNoneMinDistance
32 levelTypeLOD2(levelTypeLOD2),
33 modelLOD2MinDistance(modelLOD2MinDistance),
35 levelTypeLOD3(levelTypeLOD3),
36 modelLOD3MinDistance(modelLOD3MinDistance),
38 lodNoneMinDistance(lodNoneMinDistance)
51 if (modelLOD1 !=
nullptr) {
131 if (this->enabled ==
enabled)
return;
156 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...
LOD object 3D to be used with engine class.
void dispose() override
Dispose this object 3d.
~LODObject3D()
Public destructor.
void initialize() override
Initiates this object 3d.
void update() override
Update transformations.
Color4 effectColorAddLOD3
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.
Color4 effectColorMulLOD2
void setFrustumCulling(bool frustumCulling) override
Set frustum culling.
void setEngine(Engine *engine) override
Set up engine.
void setEnabled(bool enabled) override
Enable/disable rendering.
Color4 effectColorAddLOD2
bool isFrustumCulling() override
Color4 effectColorMulLOD3
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 setParentEntity(Entity *entity) override
Set parent entity, needs to be called before adding to engine.
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.
Representation of a 3d model.
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.