Mobile API Reference  MicroStrategy 2019
WallManager.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : WallManager.h
3 // AUTHOR : Liang Liu
4 // CREATION : 2009-05-19
5 // Copyright (C) MicroStrategy Incorporated 2009
6 // All Rights Reserved
7 //==============================================================================================
8 #ifndef MsiChart_WallManager_h
9 #define MsiChart_WallManager_h
10 
11 #include "PDCHeader/PDCvector"
12 #include "GraphObjectManager.h"
13 #include "CuboidObject.h"
14 #include "Axis.h"
15 #include "GraphCollectionObject.h"
16 
17 namespace MsiChart
18 {
21  {
22  public:
24 
29  WallManager(const TripleId& irTripleId, GraphObjectManager* ipManager, Rect2D& irPlotArea);
30  virtual ~WallManager();
31 
32  virtual void GenerateMapAndList();
33  virtual void GetOptions(Int32 iSeriesId, Int32 iPropertyId, CComVariant* opValue) const;
34 
39  void AddPrePlotWallObjects(std::vector<GraphObject::Ptr>& iorGraphObjectList);
44  void AddPostPlotWallObjects(std::vector<GraphObject::Ptr>& iorGraphObjectList);
45 
51  void SetAxis(Axis::Ptr iAxisPtr, EnumAxisDirection iAxisDirection);
52 
57  void GetWallMargin(SPoint3D& orWallMargin) const;
62  void SetYAxisMargin(Int32 iYMargin);
63 
68  void SetAllAxisMargins(Int32 iMargin);
69 
75  bool IsBeforePreWall(const DPoint3D& irAbsolutePoint) const;
81  bool IsAfterPostWall(const DPoint3D& irAbsolutePoint) const;
82 
89  bool IsHiddenByWalls(const DPoint3D& irAbsolutePoint) const;
90 
91  private:
92  void AddWallZXObjects(std::vector<GraphObject::Ptr>& iorGraphObjectList, std::vector<GraphObject::Ptr>& iorLabelList);
93  void AddWallYZObjects(std::vector<GraphObject::Ptr>& iorGraphObjectList, std::vector<GraphObject::Ptr>& iorLabelList);
94  void AddWallXYObjects(std::vector<GraphObject::Ptr>& iorGraphObjectList, std::vector<GraphObject::Ptr>& iorLabelList);
95 
96  void hLoadProperties();
97  void hTruncateSize(Int32& iorSize, Int32 iMinSize, Int32 iMaxSize);
98  DVector2D hGetAxisDirection(const DPoint3D& irStartPoint, const DPoint3D& irEndPoint) const;
99  double hGetMaxLabelOffset(GraphCollectionObject* ipLabelCollection, const DVector2D& irUnitOffsetDirection) const;
100 
101  CuboidObject::Ptr hGenerateWall(const TripleId& irWallId, const DPoint3D& irStartVertex, const DPoint3D& irEndVertex, GraphCollectionObject* ipWallSet);
102  void hGenerateInterlacedGrid(CuboidObject* ipWall, EnumAxisDirection iAxisDirection, std::vector<GraphObject::Ptr>& iorGraphObjectList);
103  void hGenerateMajorGrid(CuboidObject* ipWall, EnumAxisDirection iAxisDirection, std::vector<GraphObject::Ptr>& iorGraphObjectList);
104  GraphCollectionObject* hGenerateAxisLabels(EnumAxisDirection iAxisDirection, Int32 iAxisLabelId, const DPoint3D& irRefPoint,
105  const DVector2D& irOffsetDirection, std::vector<GraphObject::Ptr>& iorLabelList);
106  void hGenerateAxisTitle(EnumAxisDirection iAxisDirection, Int32 iAxisTitleId, const DPoint3D& irRefPoint,
107  const DVector2D& irOffsetDirection, double iTitleOffset, std::vector<GraphObject::Ptr>& iorLabelList);
108 
109  Axis* hGetAxis(EnumAxisDirection iAxisDirection) const;
110  Int32 hGetMajorGridId(EnumAxisDirection iAxisDirection) const;
111 
112  Rect2D mPlotArea;
113  SPoint3D mCubeSize;
114  SPoint3D mWallThickness;
115  SPoint3D mWallMargin;
116  DPoint3D mEyePosition;
117 
118  CuboidObject::Ptr mWallZXPtr;
119  CuboidObject::Ptr mWallYZPtr;
120  CuboidObject::Ptr mWallXYPtr;
121 
122  Axis::Ptr mXAxisPtr;
123  Axis::Ptr mYAxisPtr;
124  Axis::Ptr mZAxisPtr;
125 
127  bool mIsReverseZAxis;
128  bool mLinkColors;
129  bool mShowFloor;
130  bool mShowLeftWall;
131  bool mShowRightWall;
132  bool mShowRightYAxisLabels;
133  bool mShowRightYAxisTitle;
134  Int32 mGraphMajorType;
135  };
136 
137  inline void WallManager::hTruncateSize(Int32& iorSize, Int32 iMinSize, Int32 iMaxSize)
138  {
139  iorSize = (iorSize < iMinSize) ? iMinSize : iorSize;
140  iorSize = (iorSize > iMaxSize) ? iMaxSize : iorSize;
141  }
142 }
143 #endif
Definition: Vector2D.h:21
bool IsBeforePreWall(const DPoint3D &irAbsolutePoint) const
virtual void GenerateMapAndList()
EnumAxisDirection
Enum for axis direction.
Definition: Axis.h:29
Definition: GraphCollectionObject.h:19
This class implements cuboid object.
Definition: CuboidObject.h:47
bool IsAfterPostWall(const DPoint3D &irAbsolutePoint) const
MSynch::SmartPtr< WallManager > Ptr
Definition: WallManager.h:23
#define Int32
Definition: BasicTypes.h:20
Definition: Axis.h:123
bool IsHiddenByWalls(const DPoint3D &irAbsolutePoint) const
void SetAllAxisMargins(Int32 iMargin)
virtual void GetOptions(Int32 iSeriesId, Int32 iPropertyId, CComVariant *opValue) const
void AddPostPlotWallObjects(std::vector< GraphObject::Ptr > &iorGraphObjectList)
Definition: ABLPlot.h:21
This class manages the walls in 3D charts.
Definition: WallManager.h:20
void SetAxis(Axis::Ptr iAxisPtr, EnumAxisDirection iAxisDirection)
Definition: Msi_ccomvariant.h:24
void AddPrePlotWallObjects(std::vector< GraphObject::Ptr > &iorGraphObjectList)
void GetWallMargin(SPoint3D &orWallMargin) const
WallManager(const TripleId &irTripleId, GraphObjectManager *ipManager, Rect2D &irPlotArea)
void SetYAxisMargin(Int32 iYMargin)
Definition: GraphObjectManager.h:37
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
Definition: Common.h:397