1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| class Objet_Mobile
{
public:
Objet_Mobile():posset(false),rotset(false),tailleset(false)
{}
/* éventuellement */
Objet_Mobile(const D3DXVECTOR3& pos, const D3DXVECTOR3 rot,
const D3DXVECTOR3 & t):position(pos),rotation(rot)
taille(t), posset(true), rotset(true), tailleset(true)
{}
/*...*/
bool positionIsSet(){return posset;}
bool rotationIsSet(){return rotset;}
bool tailleIsSet(){return tailleset;}
void setPosition(const D3DXVECTOR3 &newpos)
{
position=newpos;
posset=true;
}
void setRotation(const D3DXVECTOR3 &newrot)
{
rotation=newrot;
rotset=true;
}
void setTaille(const D3DXVECTOR3 &newtaille)
{
taille=newtaille;
tailleset=true;
}
private
int point_de_vie;
D3DXVECTOR3 position;
D3DXVECTOR3 rotation;
D3DXVECTOR3 taille;
int index,
int state,
int poids;
bool posset;
bool rotset;
bool tailleset;
}; |
Partager