54 Object3DInternal::fromTransformations(transformations);
60 Object3DInternal::update();
67 if (this->enabled ==
enabled)
return;
82 Object3DInternal::setEnabled(
enabled);
93 if (this->frustumCulling ==
true) {
108 Object3DInternal::dispose();
113 Object3DInternal::initialize();
118 shaderId = StringTools::startsWith(
id,
"pbr-") ==
true ||
id.empty() ==
true?
id:
"pbr-" +
id;
122 shaderId = StringTools::startsWith(
id,
"pbr-") ==
true?StringTools::substring(
id,
string(
"pbr-").size()):
id;
138 distanceShaderId = StringTools::startsWith(
id,
"pbr-") ==
true ||
id.empty() ==
true?
id:
"pbr-" +
id;
142 distanceShaderId = StringTools::startsWith(
id,
"pbr-") ==
true?StringTools::substring(
id,
string(
"pbr-").size()):
id;
static LightingShader * getLightingShader()
void deregisterEntity(Entity *entity)
Removes a entity from internal lists, those entities can also be sub entities from entity hierarchy o...
static uint8_t getUniqueShaderId(const string &shaderId)
void registerEntity(Entity *entity)
Adds a entity to internal lists, those entities can also be sub entities from entity hierarchy or par...
void setShader(const string &shaderId)
Set shader.
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.
EntityShaderParameters shaderParameters
void update() override
Update transformations.
Object3D(const string &id, Model *model, int instances)
Public constructor.
void fromTransformations(const Transformations &transformations) override
Set up this transformations from given transformations.
void setDistanceShader(const string &id)
Set distance shader.
EntityShaderParameters distanceShaderParameters
void setFrustumCulling(bool frustumCulling) override
Set frustum culling.
void setEngine(Engine *engine) override
Set up engine.
void setEnabled(bool enabled) override
Enable/disable rendering.
uint8_t uniqueDistanceShaderId
bool isFrustumCulling() override
void setRenderer(Renderer *renderer) override
Set up renderer.
Representation of a 3d model.
ShaderModel * getShaderModel()
Interface to lighting shader program.
bool hasShader(const string &shaderId)
Returns if shader with given shader id does exist.
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.