92 lines
1.9 KiB
C++
92 lines
1.9 KiB
C++
#ifndef _ENGINE_DEVICE3D_HPP_
|
|
#define _ENGINE_DEVICE3D_HPP_
|
|
#ifndef _COMMON_GUIWINDOW_HPP_
|
|
#include <common/guiwnd.hpp>
|
|
#endif
|
|
#ifndef _COMMON_PUREDEVICE_HPP_
|
|
#include <common/purehdc.hpp>
|
|
#endif
|
|
#ifndef _COMMON_POINT_HPP_
|
|
#include <common/point.hpp>
|
|
#endif
|
|
#ifndef _ENGINE_POINT3D_HPP_
|
|
#include <engine/point3d.hpp>
|
|
#endif
|
|
#ifndef _ENGINE_VIEWSYSTEM_HPP_
|
|
#include <engine/viewsys.hpp>
|
|
#endif
|
|
|
|
class Rect3D;
|
|
|
|
class Device3D : public PureDevice, public ViewSystem
|
|
{
|
|
public:
|
|
Device3D(GUIWindow &displayWindow);
|
|
Device3D(GUIWindow &displayWindow,PureDevice &displayDevice);
|
|
Device3D(const Device3D &someDevice3D);
|
|
virtual ~Device3D();
|
|
Device3D &operator=(const ViewSystem &someViewSystem);
|
|
void line(Point3D &firstPoint3D,Point3D &secondPoint3D,const Pen &somePen);
|
|
void point(Point3D &somePoint3D,RGBColor &someRGBColor);
|
|
void rect3D(const Rect3D &someRect3D,const Pen &somePen);
|
|
void drawAxis(WORD drawFlag);
|
|
void drawAxis(const RGBColor &textColor,const RGBColor &bkColor);
|
|
void drawText(const String &text,Point3D &point3D,bool useCartesian=true);
|
|
WORD width(void)const;
|
|
WORD height(void)const;
|
|
protected:
|
|
virtual WORD viewPortWidth(void)const;
|
|
virtual WORD viewPortHeight(void)const;
|
|
private:
|
|
GUIWindow &mDisplayWindow;
|
|
};
|
|
|
|
inline
|
|
Device3D::Device3D(GUIWindow &displayWindow)
|
|
: PureDevice(displayWindow), mDisplayWindow(displayWindow)
|
|
{
|
|
}
|
|
|
|
inline
|
|
Device3D::Device3D(const Device3D &someDevice3D)
|
|
: PureDevice((PureDevice&)someDevice3D), mDisplayWindow(someDevice3D.mDisplayWindow)
|
|
{
|
|
}
|
|
|
|
inline
|
|
Device3D::~Device3D()
|
|
{
|
|
}
|
|
|
|
inline
|
|
Device3D &Device3D::operator=(const ViewSystem &someViewSystem)
|
|
{
|
|
(ViewSystem&)*this=someViewSystem;
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
WORD Device3D::width(void)const
|
|
{
|
|
return viewPortWidth();
|
|
}
|
|
|
|
inline
|
|
WORD Device3D::height(void)const
|
|
{
|
|
return viewPortHeight();
|
|
}
|
|
|
|
inline
|
|
WORD Device3D::viewPortWidth(void)const
|
|
{
|
|
return mDisplayWindow.width();
|
|
}
|
|
|
|
inline
|
|
WORD Device3D::viewPortHeight(void)const
|
|
{
|
|
return mDisplayWindow.height();
|
|
}
|
|
#endif
|