20 using std::unique_ptr;
103 virtual inline void computeAnimation(
int contextIdx, int64_t lastFrameAtTime, int64_t currentFrameAtTime){
123 void getTriangles(vector<Triangle>& triangles,
int nodeIdx = -1);
AnimationProcessingTarget
Representation of a 3D model.
Triangle entity, this is not directly connectable with physics engine.
void getTriangles(vector< Triangle > &triangles, int nodeIdx=-1)
Retrieves list of triangles of all or given nodes.
void setAnimation(const string &id, float speed=1.0f)
Sets up a base animation to play.
Transform parentTransform
virtual void initialize()
Initiates this object.
vector< Transform > instanceTransform
ObjectBase_TransformedFacesIterator * getTransformedFacesIterator()
vector< bool > instanceEnabled
bool getInstanceEnabled()
ObjectBase(Model *model, bool useManagers, Engine::AnimationProcessingTarget animationProcessingTarget, int instances)
Private constructor.
const Matrix4x4 getNodeTransformMatrix(const string &id)
Returns transform matrix for given node.
void setNodeTransformMatrix(const string &id, const Matrix4x4 &matrix)
Set transform matrix for given node.
void addOverlayAnimation(const string &id)
Overlays a animation above the base animation.
Engine::AnimationProcessingTarget animationProcessingTarget
ObjectNodeMesh * getMesh(const string &nodeId)
Returns object node mesh object.
float getOverlayAnimationTime(const string &id)
Returns current overlay animation time.
void removeOverlayAnimation(const string &id)
Removes a overlay animation.
bool hasOverlayAnimation(const string &id)
Returns if there is currently running a overlay animation with given id.
Matrix4x4 currentTransformMatrix
const string getAnimation()
unique_ptr< ObjectBase_TransformedFacesIterator > transformedFacesIterator
void setCurrentInstance(int currentInstance)
Set current instance.
void setAnimationSpeed(float speed)
Set up animation speed.
void removeOverlayAnimations()
Removes all overlay animations.
void unsetNodeTransformMatrix(const string &id)
Unset transform matrix for given node.
virtual void dispose()
Disposes this object.
float getAnimationTime()
Returns current base animation time.
void setInstanceEnabled(bool enabled)
Set current instance enabled.
vector< ObjectAnimation * > instanceAnimations
void removeFinishedOverlayAnimations()
Removes all finished overlay animations.
virtual ~ObjectBase()
Destructor.
virtual void computeAnimation(int contextIdx, int64_t lastFrameAtTime, int64_t currentFrameAtTime)
Compute animation.
void setParentTransform(const Transform &parentTransform)
Set parent transform.
vector< ObjectNode * > objectNodes
const Matrix4x4 & getTransformMatrix() const
Object node mesh specifically for rendering.
Object node specifically for rendering.
static void computeAnimation(int contextIdx, vector< ObjectNode * > &objectNodes)
Computes animation for given object nodes.
Interface to compute shader skinning shader program.
Matrix4x4 class representing matrix4x4 mathematical structure and operations for 3d space.
Matrix4x4 & set(float r0c0, float r0c1, float r0c2, float r0c3, float r1c0, float r1c1, float r1c2, float r1c3, float r2c0, float r2c1, float r2c2, float r2c3, float r3c0, float r3c1, float r3c2, float r3c3)
Sets this matrix by its components.
#define FORBID_CLASS_COPY(CLASS)