Mobile API Reference  MicroStrategy 2019
CuboidObject.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : CuboidObject.h
3 // AUTHOR : Liang Liu
4 // CREATION : 2009-05-18
5 // Copyright (C) MicroStrategy Incorporated 2009
6 // All Rights Reserved
7 //==============================================================================================
8 #ifndef MsiChart_CuboidObject_h
9 #define MsiChart_CuboidObject_h
10 
11 #include "PDCHeader/PDCvector"
12 #include "Shape3DObject.h"
13 #include "Transformer.h"
14 #include "Axis.h"
15 
16 namespace MsiChart
17 {
22  typedef enum
23  {
34  } CuboidSubtype;
35 
36  /* Extra parameter for CS_BOX.
37  */
38  typedef enum
39  {
45 
48  {
49  public:
51 
57  CuboidObject(const TripleId& irTripleId, GraphObjectManager* ipManager, const DPoint3D& irStartVertex, const DPoint3D& irEndVertex,
58  GraphCollectionObject* ipParentObject = NULL, bool iHasFill = true, Int32 iCuboidSubtype = CS_BOX, Int32 iBoxSurfaceType = BST_ALL);
59  virtual ~CuboidObject();
60 
67  void GenerateGridLinesForXAxis(const std::vector<double>& irGridLinePositions, GraphCollectionObject* ipGridCollection,
68  std::vector<GraphObject::Ptr>& iorGraphObjectList) const;
69 
76  void GenerateGridLinesForYAxis(const std::vector<double>& irGridLinePositions, GraphCollectionObject* ipGridCollection,
77  std::vector<GraphObject::Ptr>& iorGraphObjectList) const;
78 
85  void GenerateGridLinesForZAxis(const std::vector<double>& irGridLinePositions, GraphCollectionObject* ipGridCollection,
86  std::vector<GraphObject::Ptr>& iorGraphObjectList) const;
87 
94  void GenerateInterlacedGridsForXAxis(const std::vector<double>& irGridLinePositions, GraphCollectionObject* ipGridCollection,
95  std::vector<GraphObject::Ptr>& iorGraphObjectList) const;
102  void GenerateInterlacedGridsForYAxis(const std::vector<double>& irGridLinePositions, GraphCollectionObject* ipGridCollection,
103  std::vector<GraphObject::Ptr>& iorGraphObjectList) const;
110  void GenerateInterlacedGridsForZAxis(const std::vector<double>& irGridLinePositions, GraphCollectionObject* ipGridCollection,
111  std::vector<GraphObject::Ptr>& iorGraphObjectList) const;
112 
113 
114  private:
115  void hAddFacesForCuboid(Int32 iBoxSurfaceType);
116  void hAddFacesForPyramid();
117  void hAddHalfFacesForSphere();
118  void hAddFacesForOctagon();
119  void hAddFacesForCutCorner();
120  void hAddFacesForPlus();
121  void hAddFacesForTetrahedron();
122  void hAddFacesForStar();
123  void hPreprocessVertices();
124  DPoint3D hCoordTransform(const DPoint3D& irPoint) const;
125  DPoint3D hReverseCoordTransform(const DPoint3D& irPoint) const;
126  void hProcessQuadrangle(const DPoint3D& irA, const DPoint3D& irB, const DPoint3D& irC, const DPoint3D& irD, const DVector3D& irNormal);
127  void hProcessTriangle(const DPoint3D& irA, const DPoint3D& irB, const DPoint3D& irC, const DVector3D& irNormal);
128  void hCreateOneGridLine(const DPoint3D& irStartPoint, const DPoint3D& irEndPoint, GraphCollectionObject* ipGridCollection,
129  std::vector<GraphObject::Ptr>& iorGraphObjectList) const;
130  void hCreateOneGridBox(const DPoint3D& irStartPoint, const DPoint3D& irEndPoint, GraphCollectionObject* ipGridCollection,
131  std::vector<GraphObject::Ptr>& iorGraphObjectList, Int32 iBoxSurfaceType) const;
132 
133  DPoint3D mStartVertex;
134  DPoint3D mEndVertex;
135  Int32 mCuboidSubtype;
136  Transformer* mpTransformer;
137  };
138 }
139 #endif
CuboidSubtype
Definition: CuboidObject.h:22
void GenerateGridLinesForZAxis(const std::vector< double > &irGridLinePositions, GraphCollectionObject *ipGridCollection, std::vector< GraphObject::Ptr > &iorGraphObjectList) const
Definition: CuboidObject.h:43
This is the base class of 3D graph objects.
Definition: Shape3DObject.h:20
Definition: Transformer.h:52
A prism which has an octagon as its bottom face.
Definition: CuboidObject.h:27
Definition: GraphCollectionObject.h:19
MSynch::SmartPtr< CuboidObject > Ptr
Definition: CuboidObject.h:50
This class implements cuboid object.
Definition: CuboidObject.h:47
Definition: CuboidObject.h:41
#define Int32
Definition: BasicTypes.h:20
Definition: CuboidObject.h:31
Definition: CuboidObject.h:32
void GenerateInterlacedGridsForZAxis(const std::vector< double > &irGridLinePositions, GraphCollectionObject *ipGridCollection, std::vector< GraphObject::Ptr > &iorGraphObjectList) const
Assume that the bottom face will always be perpendicular to Y axis.
Definition: CuboidObject.h:25
If the 8 corners of a cube is cut at the middle points of the edges, we get a sphere object...
Definition: CuboidObject.h:26
void GenerateGridLinesForYAxis(const std::vector< double > &irGridLinePositions, GraphCollectionObject *ipGridCollection, std::vector< GraphObject::Ptr > &iorGraphObjectList) const
Definition: ABLPlot.h:21
CuboidObject(const TripleId &irTripleId, GraphObjectManager *ipManager, const DPoint3D &irStartVertex, const DPoint3D &irEndVertex, GraphCollectionObject *ipParentObject=NULL, bool iHasFill=true, Int32 iCuboidSubtype=CS_BOX, Int32 iBoxSurfaceType=BST_ALL)
A prism which has a five-edge polygon as its bottom face. This five-edge polygon comes from cutting o...
Definition: CuboidObject.h:28
Definition: CuboidObject.h:40
void GenerateInterlacedGridsForYAxis(const std::vector< double > &irGridLinePositions, GraphCollectionObject *ipGridCollection, std::vector< GraphObject::Ptr > &iorGraphObjectList) const
BoxSurfaceType
Definition: CuboidObject.h:38
Definition: CuboidObject.h:33
Definition: CuboidObject.h:42
Default cuboid object is a box.
Definition: CuboidObject.h:24
Definition: CuboidObject.h:29
#define NULL
Definition: Null.h:10
Definition: GraphObjectManager.h:37
Definition: CuboidObject.h:30
void GenerateInterlacedGridsForXAxis(const std::vector< double > &irGridLinePositions, GraphCollectionObject *ipGridCollection, std::vector< GraphObject::Ptr > &iorGraphObjectList) const
Definition: Common.h:397
void GenerateGridLinesForXAxis(const std::vector< double > &irGridLinePositions, GraphCollectionObject *ipGridCollection, std::vector< GraphObject::Ptr > &iorGraphObjectList) const