120 const vector<Model*>& imposterModelsLOD2,
250 inline const string&
getId()
override {
const Vector3 & getLookFrom() const
TDME2 engine entity shader parameters.
void setShaderParameter(const string ¶meterName, const ShaderParameter ¶meterValue)
Set shader parameter for given parameter name.
void setShader(const string &shaderId)
Set shader.
const ShaderParameter getShaderParameter(const string ¶meterName) const
Returns shader parameter for given parameter name, if the value does not exist, the default will be r...
@ ENTITYTYPE_LODOBJECT3DIMPOSTER
Imposter object 3d to be used with engine class.
void setShader(const string &id)
Set shader id.
void setRenderPass(RenderPass renderPass) override
Set render pass.
void setReceivesShadows(bool receivesShadows) override
Enable/disable receives shadows.
void setShaderParameter(const string ¶meterName, const ShaderParameter ¶meterValue)
Set shader parameter for given parameter name.
void fromTransformations(const Transformations &transformations) override
Set up this transformations from given transformations.
void setDistanceShader(const string &id)
Set distance shader id.
void setDistanceShaderDistance(float distanceShaderDistance)
Set distance shader distance.
void setContributesShadows(bool contributesShadows) override
Enable/disable contributes shadows.
Object3D * determineBillboardObject(Camera *camera)
Get current billboard object.
void setDistanceShaderParameter(const string ¶meterName, const ShaderParameter ¶meterValue)
Set distance shader parameter for given parameter name.
LOD object 3D + imposter to be used with engine class.
Object3D * getLOD1Object()
const Matrix4x4 & getTransformationsMatrix() const override
const Color4 & getEffectColorAdd() const override
The effect color will be added to fragment color.
RenderPass getRenderPass() const override
void dispose() override
Dispose this object 3d.
void setShader(const string &id)
Set shader id.
ImposterObject3D * objectLOD2
void setTranslation(const Vector3 &translation) override
Set translation.
void setParentEntity(Entity *entity) override
Set parent entity, needs to be called before adding to engine.
void removeRotation(const int idx) override
Remove rotation.
void setPivot(const Vector3 &pivot) override
Set pivot.
const int getRotationCount() const override
const Quaternion & getRotationsQuaternion() const override
void initialize() override
Initiates this object 3d.
bool isReceivesShadows() override
EntityShaderParameters shaderParameters
BoundingBox * getBoundingBox() override
void setRenderPass(RenderPass renderPass) override
Set render pass.
void setReceivesShadows(bool receivesShadows) override
Enable/disable receives shadows.
const string & getShader()
void addRotation(const Vector3 &axis, const float angle) override
Add rotation.
void update() override
Update transformations.
const string & getId() override
void setPickable(bool pickable) override
Set this object pickable.
float getDistanceShaderDistance()
Entity * getParentEntity() override
void setEffectColorMul(const Color4 &effectColorMul) override
Set effect color that will be multiplied with fragment color.
const ShaderParameter getShaderParameter(const string ¶meterName)
Returns shader parameter for given parameter name, if the value does not exist, the default will be r...
const Color4 & getEffectColorMulLOD2() const
Object3D * determineLODObject(Camera *camera)
Get current lod object.
bool isPickable() override
const Vector3 & getTranslation() const override
void setShaderParameter(const string ¶meterName, const ShaderParameter ¶meterValue)
Set shader parameter for given parameter name.
float distanceShaderDistance
const ShaderParameter getDistanceShaderParameter(const string ¶meterName)
Returns distance shader parameter for given parameter name, if the value does not exist,...
void fromTransformations(const Transformations &transformations) override
Set up this transformations from given transformations.
bool enableEarlyZRejection
const string & getDistanceShader()
const Color4 & getEffectColorMul() const override
The effect color will be multiplied with fragment color.
const Vector3 & getScale() const override
const Vector3 & getPivot() const override
void setEffectColorAddLOD2(const Color4 &effectColorAddLOD2)
Set effect color add for LOD2 level.
void setEnableEarlyZRejection(bool enableEarlyZRejection)
Enable/disable early z rejection.
bool isEnableEarlyZRejection() const
BoundingBox * getBoundingBoxTransformed() override
void setDistanceShader(const string &id)
Set distance shader id.
Color4 effectColorMulLOD2
void setScale(const Vector3 &scale) override
Set scale.
LODObject3DImposter(const string &id, Model *modelLOD1, const vector< Model * > &imposterModelsLOD2, float lod2MinDistance, float lodNoneMinDistance=150.0f)
Public constructor.
bool isContributesShadows() override
const Matrix4x4 getNodeTransformationsMatrix(const string &id)
Object3D * getLODObject()
EntityShaderParameters distanceShaderParameters
void applyParentTransformations(const Transformations &parentTransformations) override
Apply parent transformations.
const float getRotationAngle(const int idx) const override
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.
EntityType getEntityType() override
Color4 effectColorAddLOD2
const Vector3 & getRotationAxis(const int idx) const override
const Color4 & getEffectColorAddLOD2() const
void setDistanceShaderDistance(float distanceShaderDistance)
Set distance shader distance.
void setContributesShadows(bool contributesShadows) override
Enable/disable contributes shadows.
void setRotationAxis(const int idx, const Vector3 &axis) override
Set rotation axis.
bool isFrustumCulling() override
bool isEnabled() override
Rotation & getRotation(const int idx) override
Get rotation at given index.
void setEffectColorMulLOD2(const Color4 &effectColorMulLOD2)
Set effect color mul for LOD2 level.
void setEffectColorAdd(const Color4 &effectColorAdd) override
Set effect color that will be added to fragment color.
void setDistanceShaderParameter(const string ¶meterName, const ShaderParameter ¶meterValue)
Set distance shader parameter for given parameter name.
void setRenderer(Renderer *renderer) override
Set up renderer.
ImposterObject3D * getLOD2Object()
~LODObject3DImposter()
Public destructor.
void setRotationAngle(const int idx, const float angle) override
Object 3D to be used with engine class.
void setShader(const string &id)
Set shader.
BoundingBox * getBoundingBox() override
void setRenderPass(RenderPass renderPass) override
Set render pass.
void setReceivesShadows(bool receivesShadows) override
Enable/disable receives shadows.
void setShaderParameter(const string ¶meterName, const ShaderParameter ¶meterValue)
Set shader parameter for given parameter name.
void fromTransformations(const Transformations &transformations) override
Set up this transformations from given transformations.
BoundingBox * getBoundingBoxTransformed() override
void setDistanceShader(const string &id)
Set distance shader.
void setDistanceShaderDistance(float distanceShaderDistance)
Set distance shader distance.
void setContributesShadows(bool contributesShadows) override
Enable/disable contributes shadows.
void setDistanceShaderParameter(const string ¶meterName, const ShaderParameter ¶meterValue)
Set distance shader parameter for given parameter name.
Shader parameter model class.
Representation of a 3d model.
Axis aligned bounding box used for frustum, this is not directly connectable with physics engine.
Vector3 computeClosestPointInBoundingBox(const Vector3 &point)
Compute closest point in bounding box of given point.
const Matrix4x4 getNodeTransformationsMatrix(const string &id)
Returns transformation matrix for given node.
float computeLengthSquared() const
Vector3 & sub(const Vector3 &v)
Subtracts a vector.