356 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...
LOD object 3D 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.
LODLevelType levelTypeLOD3
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.
const Color4 & getEffectColorAddLOD3() const
void setPivot(const Vector3 &pivot) override
Set pivot.
const int getRotationCount() const override
const Quaternion & getRotationsQuaternion() const override
~LODObject3D()
Public destructor.
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.
Color4 effectColorAddLOD3
float getDistanceShaderDistance()
Entity * getParentEntity() override
void setEffectColorMul(const Color4 &effectColorMul) override
Set effect color that will be multiplied with fragment color.
float modelLOD3MinDistance
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
LODLevelType levelTypeLOD2
const Vector3 & getTranslation() const override
void setShaderParameter(const string ¶meterName, const ShaderParameter ¶meterValue)
Set shader parameter for given parameter name.
const Color4 & getEffectColorMulLOD3() const
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
float modelLOD2MinDistance
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.
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
LODObject3D(const string &id, Model *modelLOD1, LODLevelType levelTypeLOD2, float modelLOD2MinDistance, Model *modelLOD2, LODLevelType levelTypeLOD3, float modelLOD3MinDistance, Model *modelLOD3, float lodNoneMinDistance=150.0f)
Public constructor.
const Transformations & getTransformations() const override
void setFrustumCulling(bool frustumCulling) override
Set frustum culling.
void setEngine(Engine *engine) override
Set up engine.
Object3D * getLOD2Object()
void setEnabled(bool enabled) override
Enable/disable rendering.
Object3D * getLOD3Object()
EntityType getEntityType() override
Color4 effectColorAddLOD2
const Vector3 & getRotationAxis(const int idx) const override
const Color4 & getEffectColorAddLOD2() const
void setEffectColorMulLOD3(const Color4 &effectColorMulLOD3)
Set effect color mul for LOD3 level.
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
Color4 effectColorMulLOD3
void setEffectColorAddLOD3(const Color4 &effectColorAddLOD3)
Set effect color add for LOD3 level.
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.
void setRotationAngle(const int idx, const float angle) override
Object 3D render group for static objects that might be animated by shaders.
Object 3D to be used with engine class.
const Color4 & getEffectColorAdd() const override
The effect color will be added to fragment color.
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 setEffectColorMul(const Color4 &effectColorMul) override
Set effect color that will be multiplied with fragment color.
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.
const Color4 & getEffectColorMul() const override
The effect color will be multiplied with fragment color.
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 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.
Shader parameter model class.
void add(float r, float g, float b, float a)
Add to color.
Color4Base & scale(float scale)
Scale this color.
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.