Mobile API Reference  MicroStrategy 2019
DepthRectangleObject.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : DepthRectangleObject.h
3 // AUTHOR : Xin Liu
4 // CREATION : 10/20/08
5 // Copyright (C) MicroStrategy, Inc. 2008
6 //==============================================================================================
7 
8 #ifndef MSICHART_DEPTHRECTANGLEOBJECT_H
9 #define MSICHART_DEPTHRECTANGLEOBJECT_H
10 
11 #include "RectangleObject.h"
12 
13 namespace MsiChart
14 {
18  typedef enum
19  {
24  }FaceType;
25 
30  {
31  public:
33 
40  DepthRectangleObject(const TripleId& irTripleId,
41  GraphObjectManager* ipManager, // manager who create the object
42  const Rect2D& irRect, Int32 iDepth, Int32 iAngle,
43  GraphCollectionObject* ipParentObject = NULL, unsigned char iDataPointFaceType = FT_FRONT);
44 
45  virtual ~DepthRectangleObject();
46 
47  //virtual functions from GraphObject
48  //virtual void Draw() const;
49  virtual void DrawOutLine();
50  virtual bool PointInObject(const Point2D& irPoint);
51  virtual void GenerateImageMap(ImageMap& iorImageMap); //reuse RectangleObject::GenerateImageMap() method
52  virtual Int32 DistanceToPoint(const Point2D& irPoint);
53  virtual Point2D GetDataPoint();
54 
55 
56  //pure virtual function from ShapeObject
57  virtual void GetBoundingRect(Rect2D& orBoundingRect) const;
58 
59  //virtual void SetProgress(double iProgress);
60 
61  protected:
62  virtual void GetClockwisePolygon(std::vector<Point2D>& orPolygon) const;
63 
65  virtual void DoDraw() const;
66 
67  virtual void SetRect(const Rect2D& irRect);
68 
69  private:
73  void hCalcuateTopAndSideFace();
74 
78  void hFillTop() const;
79 
83  void hFillSide()const;
84 
88  void hFillFront()const;
89 
90  Rect2D mFront;
91 // Rect2D mFinalFront;
92 
93  std::vector<Point2D> mTop;
94  std::vector<Point2D> mSide;
95 
96 // std::vector<Point2D> mFinalTop; ///< The polygon delegating the top or the bottom face.
97 // std::vector<Point2D> mFinalSide; ///< The polygon delegating the side face.
98 
99  Int32 mDepth;
100  Int32 mAngle;
101  mutable unsigned char mFaceType;
102  unsigned char mDataPointFaceType;
103 
104  };
105 
106 }
107 
108 #endif
Definition: RectangleObject.h:45
Definition: DepthRectangleObject.h:29
virtual bool PointInObject(const Point2D &irPoint)
virtual Int32 DistanceToPoint(const Point2D &irPoint)
Definition: GraphCollectionObject.h:19
virtual void GetBoundingRect(Rect2D &orBoundingRect) const
Get the bounding rectangle area of the rect.
Definition: DepthRectangleObject.h:23
virtual void DoDraw() const
This is a helper method;.
FaceType
Definition: DepthRectangleObject.h:18
Definition: DepthRectangleObject.h:21
#define Int32
Definition: BasicTypes.h:20
virtual void GenerateImageMap(ImageMap &iorImageMap)
virtual void SetRect(const Rect2D &irRect)
Definition: DepthRectangleObject.h:22
Definition: SmartPtr.h:38
MSynch::SmartPtr< DepthRectangleObject > Ptr
Definition: DepthRectangleObject.h:32
Definition: ABLPlot.h:21
Definition: DepthRectangleObject.h:20
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
virtual void GetClockwisePolygon(std::vector< Point2D > &orPolygon) const
Get the clockwise polygon that surrounding the object.
#define NULL
Definition: Null.h:10
Definition: GraphObjectManager.h:37
DepthRectangleObject(const TripleId &irTripleId, GraphObjectManager *ipManager, const Rect2D &irRect, Int32 iDepth, Int32 iAngle, GraphCollectionObject *ipParentObject=NULL, unsigned char iDataPointFaceType=FT_FRONT)
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
virtual Point2D GetDataPoint()
Definition: Common.h:397