25 #ifndef __I6ENGINE_API_MOVERINTERPOLATECOMPONENT_H__
26 #define __I6ENGINE_API_MOVERINTERPOLATECOMPONENT_H__
51 enum class Mode : uint16_t {
58 enum class Way : uint16_t {
69 void addKeyFrame(
const Vec3 & position,
const Quaternion & rotation);
75 void removeKeyFrame(
const uint32_t
id);
88 return _keyFrames[nth];
103 void start(
Vec3 & startPos)
override;
111 return "MoverInterpolate";
114 void reset()
override;
116 std::vector<componentOptions> getComponentOptions()
override;
123 std::vector<keyFrame> _keyFrames;
144 double _totalDistance;
154 size_t _currentFrame;
168 void getNewPosition(
const uint64_t t,
Vec3 & newPos,
Quaternion & newRot)
override;
This component let's the Object move through the world automatically on fixed paths Use addKeyFrame()...
keyFrame getKeyframe(const uint32_t nth) const
gets the nth keyFrame param[in] nth which keyFrame should be returned nth can be an arbitary number...
Class describing a 3d rotation.
#define ISIXE_MODULES_API
boost::shared_ptr< Message > Ptr
std::map< std::string, std::string > attributeMap
Implements 3-dimensional vectors.
void setMode(const Mode m)
std::pair< Vec3, Quaternion > keyFrame
moving an object interpolating in some way For creating a MoverInterpolateComponent, these keys are possible: Name Required Type Description Public way yes short How are the frames interpolated, one of enum entries of Way yes mode yes short In which order the frames will be processed yes direction yes bool Direction of this mover, true is forward, false is backward yes openTime *) uint64_t time mover stays at end position before moving backwards, *) required when mode is TWOSTATE_OPENTIME yes keyframes yes int number of keyframes to follow yes keyframe__pos *) vector position of i-th keyframe, *) required for all keyframes yes keyframe__rot *) quaternion rotation of i-th keyframe, *) required for all keyframes yes
void setOpenTime(const uint64_t opentime)
std::string getTemplateName() const override
returns the name this template was registered with