igraphic 0.2.0
Contrats graphiques chargeables : IGraphic2Module / IGraphic3Module
Loading...
Searching...
No Matches
IModel.hpp
Go to the documentation of this file.
1
14#ifndef IMODEL_HPP_
15 #define IMODEL_HPP_
16 #include "Type.hpp"
17 #include "../window/IWindow.hpp"
18 #include "IAnimationSet.hpp"
19 #include "ITexture.hpp"
20
21namespace graphic {
22
27 class IModel {
28
29 public:
30 //constructor
31 virtual ~IModel() = default;
32
33 // a loaded ITexture, not a path - swapping a model's texture
34 // never implies a reload from disk
35 virtual void setTexture(ITexture *texture) = 0;
36
37 // a loaded IAnimationSet, not a path - swapping a model's
38 // animations never implies a reload from disk
39 virtual void setAnimations(IAnimationSet *animations) = 0;
40 virtual int getAnimationsSize() const = 0;
41 virtual void setAnimation(int pos) = 0;
42 virtual int getAnimation() const = 0;
49 virtual bool updateAnimation() = 0;
50
58 virtual void setFrameRange(int first, int last) = 0;
59 virtual int getFirstFrame() const = 0;
60 virtual int getLastFrame() const = 0;
61
62 // where we are inside the current clip
63 virtual void setFrame(int frame) = 0;
64 virtual int getFrame() const = 0;
65 //p
66 virtual Vector3f getPosition() const = 0;
67 virtual void setPosition(Vector3f position) = 0;
68
69 virtual Vector3f getRotation() const = 0;
70 virtual void setRotation(Vector3f rotation) = 0;
71
72 virtual Vector3f getSize() const = 0;
73 virtual void setSize(Vector3f size) = 0;
74
75 private:
76 //your variables here
77 };
78
79} // namespace graphic3
80
83#endif /* !IMODEL_HPP_ */
A file's loaded animation clips, independent of any IModel bound to it - deleting every bound IModel ...
Definition IAnimationSet.hpp:26
Model interface.
Definition IModel.hpp:27
virtual void setTexture(ITexture *texture)=0
virtual int getAnimation() const =0
virtual int getFirstFrame() const =0
virtual int getAnimationsSize() const =0
virtual void setAnimation(int pos)=0
virtual int getFrame() const =0
virtual Vector3f getSize() const =0
virtual Vector3f getRotation() const =0
virtual void setRotation(Vector3f rotation)=0
virtual bool updateAnimation()=0
Steps one frame forward inside the current range.
virtual ~IModel()=default
virtual void setPosition(Vector3f position)=0
virtual void setFrame(int frame)=0
virtual Vector3f getPosition() const =0
virtual int getLastFrame() const =0
virtual void setFrameRange(int first, int last)=0
Restricts playback to [first, last] of the current clip.
virtual void setAnimations(IAnimationSet *animations)=0
virtual void setSize(Vector3f size)=0
Loaded pixel data, independent of any ISprite that references it. Deleting every ISprite built from a...
Definition ITexture.hpp:23
Definition IGamepad.hpp:14