Mobile API Reference  MicroStrategy 2019
Shape3DObject.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : Shape3DObject.h
3 // AUTHOR : Liang Liu
4 // CREATION : 2009-05-18
5 // Copyright (C) MicroStrategy Incorporated 2009
6 // All Rights Reserved
7 //==============================================================================================
8 #ifndef MsiChart_Shape3DObject_h
9 #define MsiChart_Shape3DObject_h
10 
11 #include "PDCHeader/PDCvector"
12 #include "ShapeObject.h"
13 #include "Vector3D.h"
14 
15 namespace MsiChart
16 {
17  typedef std::vector<DPoint3D> Polygon3D;
18 
20  class Shape3DObject: public ShapeObject
21  {
22  public:
24 
28  Shape3DObject(const TripleId& irTripleId, GraphObjectManager* ipManager,
29  GraphCollectionObject* ipParentObject = NULL, bool iHasFill = true);
30  virtual ~Shape3DObject();
31 
36  void AddPolygon(const Polygon3D& irPolygon, const Vector3D<double>& irPlaneNormal);
37 
38  // Inherit from GraphObject class.
39  virtual void Draw() const;
40  virtual void DrawOutLine();
41  virtual bool PointInObject(const Point2D& irPoint);
42  virtual bool ObjectInRectangle(const Rect2D& irRect);
43  virtual void GenerateImageMap(ImageMap& iorImageMap);
44  virtual void GetBoundingRect(Rect2D& orBoundingRect) const;
45  virtual Int32 DistanceToPoint(const Point2D& irPoint);
46 
51  Point2D GetHighestPoint() const;
52 
56  bool IsValid() const;
57 
58  protected:
59  // Inherit from GraphObject class.
60  virtual void GetClockwisePolygon(std::vector<Point2D>& orPolygon) const;
61 
62  // Inherit from ShapeObject class.
63  virtual void FillBevel() const;
64  virtual void AddCompensativeLayer() const;
65 
66  //-----------Data member--------------------------
67  //std::vector<Polygon3D> m3DPolygons; ///< Represents a vector of 3D polygons.
68  std::vector<Polygon2D> m2DPolygonList;
69  std::vector<float> mLightFactorList;
70  mutable Int32 mPolygonIndex;
71  bool mIsValid;
72  };
73 
74  inline bool Shape3DObject::IsValid() const
75  {
76  return mIsValid;
77  }
78 }
79 #endif
bool IsValid() const
Definition: Shape3DObject.h:74
This is the base class of 3D graph objects.
Definition: Shape3DObject.h:20
MSynch::SmartPtr< Shape3DObject > Ptr
Definition: Shape3DObject.h:23
Definition: GraphCollectionObject.h:19
std::vector< DPoint3D > Polygon3D
Definition: Shape3DObject.h:17
Shape3DObject(const TripleId &irTripleId, GraphObjectManager *ipManager, GraphCollectionObject *ipParentObject=NULL, bool iHasFill=true)
virtual void GetClockwisePolygon(std::vector< Point2D > &orPolygon) const
bool mIsValid
Indicates whether the current Shape3DObject has a valid location.
Definition: Shape3DObject.h:71
Definition: ShapeObject.h:20
Int32 mPolygonIndex
Indicates an index in m2DPolygonList. This index is useful for GetBoundingRect() and GetClockwisePoly...
Definition: Shape3DObject.h:70
virtual void GenerateImageMap(ImageMap &iorImageMap)
std::vector< float > mLightFactorList
Maintains the light factors for the projected polygons.
Definition: Shape3DObject.h:69
#define Int32
Definition: BasicTypes.h:20
void AddPolygon(const Polygon3D &irPolygon, const Vector3D< double > &irPlaneNormal)
virtual void DrawOutLine()
virtual void AddCompensativeLayer() const
virtual void Draw() const
Definition: SmartPtr.h:38
Point2D GetHighestPoint() const
Definition: ABLPlot.h:21
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
virtual bool PointInObject(const Point2D &irPoint)
virtual void GetBoundingRect(Rect2D &orBoundingRect) const
virtual void FillBevel() const
virtual Int32 DistanceToPoint(const Point2D &irPoint)
#define NULL
Definition: Null.h:10
Definition: GraphObjectManager.h:37
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
std::vector< Polygon2D > m2DPolygonList
Maintains a vector of projected polygons.
Definition: Shape3DObject.h:68
Definition: Common.h:397
virtual bool ObjectInRectangle(const Rect2D &irRect)