85 lines
1.7 KiB
C++
85 lines
1.7 KiB
C++
#ifndef _PROTO_PUREOBJECT_HPP_
|
|
#define _PROTO_PUREOBJECT_HPP_
|
|
#ifndef _ENGINE_DIB3D_HPP_
|
|
#include <engine/dib3d.hpp>
|
|
#endif
|
|
#ifndef _GEOMETRY_ROTATIONMATRIX_HPP_
|
|
#include <geometry/rmatrix.hpp>
|
|
#endif
|
|
#ifndef _GEOMETRY_TRANSLATIONMATRIX_HPP_
|
|
#include <geometry/tmatrix.hpp>
|
|
#endif
|
|
|
|
class Vector3D;
|
|
|
|
class PureObject
|
|
{
|
|
public:
|
|
enum State{Active,Idle,Delete};
|
|
PureObject(UINT id=0,State initState=Active);
|
|
virtual ~PureObject();
|
|
State getState(void)const;
|
|
void setState(State state);
|
|
UINT getID(void)const;
|
|
void setID(UINT id);
|
|
virtual void rotate(const PureAngle &pureAngle,RotationMatrix::Orientation orientation)=0;
|
|
virtual void translate(const Point &uvPoint,TranslationMatrix::Orientation orientation)=0;
|
|
virtual void map(SmartPointer<DIB3D> &displayBitmap)=0;
|
|
virtual void normalize(void)=0;
|
|
virtual bool isInView(SmartPointer<DIB3D> &displayBitmap)=0;
|
|
virtual const Vector3D &getVector(void)const=0;
|
|
private:
|
|
PureObject(const PureObject &somePureObject);
|
|
PureObject &operator=(const PureObject &somePureObject);
|
|
|
|
State mState;
|
|
UINT mID;
|
|
};
|
|
|
|
inline
|
|
PureObject::PureObject(UINT id,State initState)
|
|
: mID(id), mState(initState)
|
|
{
|
|
}
|
|
|
|
inline
|
|
PureObject::PureObject(const PureObject &somePureObject)
|
|
{ // private implementation
|
|
*this=somePureObject;
|
|
}
|
|
|
|
inline
|
|
PureObject::~PureObject()
|
|
{
|
|
}
|
|
|
|
inline
|
|
PureObject &PureObject::operator=(const PureObject &somePureObject)
|
|
{ // private implementation
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
PureObject::State PureObject::getState(void)const
|
|
{
|
|
return mState;
|
|
}
|
|
|
|
inline
|
|
void PureObject::setState(State state)
|
|
{
|
|
mState=state;
|
|
}
|
|
|
|
inline
|
|
UINT PureObject::getID(void)const
|
|
{
|
|
return mID;
|
|
}
|
|
|
|
inline
|
|
void PureObject::setID(UINT id)
|
|
{
|
|
mID=id;
|
|
}
|
|
#endif |