|
From: <an...@us...> - 2003-06-24 21:16:39
|
Update of /cvsroot/devmaster/engine/include/core
In directory sc8-pr-cvs1:/tmp/cvs-serv12334/include/core
Added Files:
sue_mov_object.h
Log Message:
--- NEW FILE: sue_mov_object.h ---
#ifndef _SUE_MOV_OBJECT_H_
#define _SUE_MOV_OBJECT_H_
//-----------------------------------------------------------------------------
// file : sue_mov_object.h
// date : 24.6.2003
// contributors : anubis
//-----------------------------------------------------------------------------
// (C) 2003 Devmaster
//-----------------------------------------------------------------------------
// history :
//-----------------------------------------------------------------------------
#include "core/sue_core_config.h"
namespace Molotov
{
/**
* MoveableObject
*
* represents a moveable object in the world
*/
class MoveableObject
{
public:
MoveableObject();
virtual ~MoveableObject();
/**
* @desc
* update the object's view matrix
* @return
* returns true if the object's state has changed this frame
*/
virtual bool Update();
/**
* @desc
* move the object
*/
void Move(float x, float y, float z);
void Move(Vector3 &mov);
/**
* @desc
* rotate the object around the three axes
*/
void Rotate(float x, float y, float z);
void Rotate(Vector3 &rot);
/* set/get the pos of the object */
inline void SetPos(Vector3 &pos) { this->pos = pos; this->dirty = true; }
inline Vector3 GetPos() { return this->pos; }
/* retrieve the objects view matrix */
inline Matrix4x4& GetViewMatrix() { return this->view_matrix; }
private:
/* has the posistion or rotation of the object changed this frame ? */
bool dirty;
/* positio of the object */
Vector3 pos;
/* rotation of the object represented through three rotation angles */
Vector3 dir;
/* final compiled view matrix of the object */
Matrix4x4 view_matrix;
};
} // namespace SpaceUnlimited
#endif // _SUE_MOV_OBJECT_H_
|