00001
00002
00004
00005 #if !defined(AFX_MYRECTANGLE_H__229F99AF_C3E2_48FE_8A6E_0D8A57B310E5__INCLUDED_)
00006 #define AFX_MYRECTANGLE_H__229F99AF_C3E2_48FE_8A6E_0D8A57B310E5__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012 #include "MyObject.h"
00013 #include "Point3D.h"
00014
00016 class MyRectangle : public MyObject
00017 {
00018 public:
00020 float GetLength();
00022 float GetWidth();
00024 float GetHeight();
00025 virtual void Init(MyObject *obj);
00027 CPoint3D GetMaxPoint();
00029 CPoint3D GetMinPoint();
00031 void SetHeight(float height);
00033 void SetWidth(float width);
00035 void SetLength(float length);
00036
00038 MyRectangle(CPoint3D position, float length,float width,
00039 float height,float lineWidth, GLubyte *rgba);
00040
00042 MyRectangle();
00043
00044 virtual void Draw();
00045 virtual bool IsInside(CPoint3D pos);
00046 virtual void SetPosition(CPoint3D position);
00047
00048 virtual ~MyRectangle();
00049
00050 protected:
00051 void UpdateMinPoint();
00052 void UpdateMaxPoint();
00053
00054 CPoint3D m_MinPoint;
00055 CPoint3D m_MaxPoint;
00056
00057 float m_Length;
00058 float m_Height;
00059 float m_Width;
00060 };
00061
00062 #endif // !defined(AFX_MYRECTANGLE_H__229F99AF_C3E2_48FE_8A6E_0D8A57B310E5__INCLUDED_)