108 auto currentFrame = timing->getFrame();
128 Object3DInternal::computeTransformations(contextIdx, lastFrameAtTime, currentFrameAtTime);
147 if (object3DNode->renderer->needsPreRender() ==
true) {
148 object3DNode->renderer->preRender(contextIdx);
168 for (
auto& transformations:
instanceTransformations) transformations.applyParentTransformations(parentTransformations);
206 return Object3DInternal::isEnabled();
216 return Object3DInternal::getBoundingBox();
220 return Object3DInternal::getBoundingBoxTransformed();
224 return Object3DInternal::getEffectColorAdd();
232 return Object3DInternal::getEffectColorMul();
239 inline const string&
getId()
override {
240 return Object3DInternal::getId();
244 return Object3DInternal::isContributesShadows();
252 return Object3DInternal::isReceivesShadows();
260 return Object3DInternal::isPickable();
264 Object3DInternal::setPickable(
pickable);
440 this->reflectionEnvironmentMappingPosition.
set(0.0f, 0.0f, 0.0f);
const Vector3 & getLookFrom() const
static STATIC_DLL_IMPEXT AnimationProcessingTarget animationProcessingTarget
static float getTransformationsComputingReduction2Distance()
static float getTransformationsComputingReduction1Distance()
TDME2 engine entity shader parameters.
void setShaderParameter(const string ¶meterName, const ShaderParameter ¶meterValue)
Set shader parameter for given parameter name.
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...
Imposter object 3d to be used with engine class.
LOD object 3D + imposter to be used with engine class.
LOD object 3D to be used with engine class.
Object 3D render group for static objects that might be animated by shaders.
Object 3D to be used with engine class.
Engine::EffectPass excludeFromEffectPass
const Matrix4x4 & getTransformationsMatrix() const override
const Color4 & getEffectColorAdd() const override
The effect color will be added to fragment color.
void computeTransformations(int contextIdx)
Compute animations.
friend class SkinnedObject3DRenderGroup
RenderPass getRenderPass() const override
void dispose() override
Dispose this object 3d.
void setShader(const string &id)
Set shader.
void setTranslation(const Vector3 &translation) override
Set translation.
bool isNeedsForwardShading()
bool hasReflectionEnvironmentMappingPosition()
void setParentEntity(Entity *entity) override
Set parent entity, needs to be called before adding to engine.
void removeRotation(const int idx) override
Remove rotation.
bool isNeedsComputeTransformations()
int64_t frameTransformationsLast
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
uint8_t getUniqueDistanceShaderId()
EntityShaderParameters shaderParameters
Engine::EffectPass getExcludeFromEffectPass() const
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.
Object3D(const string &id, Model *model, int instances)
Public constructor.
void unsetReflectionEnvironmentMappingPosition()
Unset reflection environment mapping position.
const string & getId() override
void setPickable(bool pickable) override
Set this object pickable.
bool reflectionEnvironmentMappingPositionSet
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...
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 & getReflectionEnvironmentMappingPosition()
const Vector3 & getScale() const override
const Vector3 & getPivot() const override
uint8_t getUniqueShaderId()
void setEnableEarlyZRejection(bool enableEarlyZRejection)
Enable/disable early z rejection.
bool isEnableEarlyZRejection() const
BoundingBox * getBoundingBoxTransformed() override
void setDistanceShader(const string &id)
Set distance shader.
void setReflectionEnvironmentMappingId(const string &reflectionEnvironmentMappingId)
void setScale(const Vector3 &scale) override
Set scale.
bool isDisableDepthTest() const
bool isContributesShadows() override
string reflectionEnvironmentMappingId
Vector3 reflectionEnvironmentMappingPosition
EntityShaderParameters distanceShaderParameters
const string & getReflectionEnvironmentMappingId()
void applyParentTransformations(const Transformations &parentTransformations) override
Apply parent transformations.
const float getRotationAngle(const int idx) const override
void setReflectionEnvironmentMappingPosition(const Vector3 &reflectionEnvironmentMappingPosition)
Set reflection environment mapping position.
const Transformations & getTransformations() const override
void setFrustumCulling(bool frustumCulling) override
Set frustum culling.
void setEngine(Engine *engine) override
Set up engine.
void setExcludeEffectPass(Engine::EffectPass effectPass)
Set exclude from effect pass.
void setEnabled(bool enabled) override
Enable/disable rendering.
int64_t timeTransformationsLast
EntityType getEntityType() override
const Vector3 & getRotationAxis(const int idx) const override
void computeTransformations(int contextIdx, int64_t lastFrameAtTime, int64_t currentFrameAtTime) override
Compute transformations.
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.
void preRender(int contextIdx)
Pre render step like uploading VBOs and such.
uint8_t uniqueDistanceShaderId
bool isFrustumCulling() override
bool isEnabled() override
Rotation & getRotation(const int idx) override
Get rotation at given index.
void setNeedsPreRender(bool needsPreRender)
Set up if this object3d instance needs a preRender() call each frame.
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
void setDisableDepthTest(bool disableDepthTest)
Set disable depth test.
Object particle system entity to be used with engine class.
Shader parameter model class.
int64_t getCurrentFrameAtTime()
Representation of a 3d model.
bool hasBoundingBoxUpdate()
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.
Object3D animation class.
vector< Object3DNode * > object3dNodes
vector< Transformations > instanceTransformations
void updateBoundingBox()
Update bounding volume.
Object 3D node VBO renderer.
Object 3d node specifically for rendering.
Vector3 & set(float x, float y, float z)
Set up vector.