CFx SDK Documentation  2020SP3
GiDefaultContext.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef _ODGI_DEFAULTCONTEXT_INCLUDED_
25 #define _ODGI_DEFAULTCONTEXT_INCLUDED_
26 
27 #include "Gi/GiCommonDraw.h"
28 #include "DbRootExport.h"
29 
30 #include "TD_PackPush.h"
31 
40 {
41 public:
43 
46 
47  virtual void getDefaultTextStyle(OdGiTextStyle& textStyle);
48 
49  virtual void drawText(
50  OdGiCommonDraw* pDraw,
51  OdGePoint3d& position,
52  const OdChar* msg,
53  OdInt32 numBytes,
54  const OdGiTextStyle* pTextStyle,
55  OdUInt32 flags = 0);
56 
57  virtual void drawText(
58  OdGiCommonDraw* pDraw,
59  OdGePoint3d& position,
60  double height,
61  double width,
62  double oblique,
63  const OdString& msg);
64 
65  virtual void drawText(
66  OdGiConveyorGeometry* pDest,
67  const OdGePoint3d& position,
68  const OdGeVector3d& direction,
69  const OdGeVector3d& upVector,
70  const OdChar* msg,
71  OdInt32 nLength,
72  bool raw,
73  const OdGiTextStyle* pTextStyle,
74  const OdGeVector3d* pExtrusion);
75 
76  virtual void drawShape(
77  OdGiCommonDraw* pDraw,
78  OdGePoint3d& position,
79  int shapeNumber,
80  const OdGiTextStyle* pTextStyle);
81 
82  void drawShape(
83  OdGiConveyorGeometry* pDest,
84  const OdGePoint3d& position,
85  const OdGeVector3d& direction,
86  const OdGeVector3d& upVector,
87  int shapeNumber,
88  const OdGiTextStyle* pTextStyle,
89  const OdGeVector3d* pExtrusion);
90 
91  virtual void textExtentsBox(
92  const OdGiTextStyle& textStyle,
93  const OdChar* msg,
94  int nLength,
95  OdUInt32 flags,
96  OdGePoint3d& min,
97  OdGePoint3d& max,
98  OdGePoint3d* pEndPos = 0);
99 
100  virtual void shapeExtentsBox(
101  const OdGiTextStyle& textStyle,
102  int shapeNumber,
103  OdGePoint3d& min,
104  OdGePoint3d& max);
105 
106  virtual void setPlotGeneration(
107  bool plotGeneration) = 0;
108 
109  virtual ODCOLORREF paletteBackground() const = 0;
110  virtual void setPaletteBackground(
111  ODCOLORREF paletteBackground) = 0;
112 
113  virtual bool isZeroTextNormals() const { return false; }
114 
115  virtual bool supportVerticalTTFText() const { return false; }
116 
120  virtual bool useGsModel() const { return false; }
121 
126  virtual void enableGsModel(bool enable);//{ throw OdError(eNotImplemented); }
127 
129  {
130  kHatchTriangulation, //no polygons (default rendering)
131  kHatchPolygon, //polygons only
132  kHatchBoth //triangulation and polygons
133  };
134 
135  virtual SolidHatchAsPolygonMode hatchAsPolygon() const { return kHatchTriangulation; }
137 
138  virtual OdDbStub* getStubByID( OdUInt64 persistentId ) const;
139  virtual OdUInt64 getIDByStub( OdDbStub* objectId ) const;
140  virtual OdDbBaseDatabase *getDatabaseByStub( OdDbStub* objectId ) const;
141  virtual OdDbStub* getOwnerIDByStub( OdDbStub* objectId ) const;
142 };
143 
148 
149 
150 #include "TD_PackPop.h"
151 
152 #endif //_ODGI_DEFAULTCONTEXT_INCLUDED_
OdGiDefaultContext::drawShape
void drawShape(OdGiConveyorGeometry *pDest, const OdGePoint3d &position, const OdGeVector3d &direction, const OdGeVector3d &upVector, int shapeNumber, const OdGiTextStyle *pTextStyle, const OdGeVector3d *pExtrusion)
OdGiContext
Definition: GiCommonDraw.h:108
OdGiDefaultContext::useGsModel
virtual bool useGsModel() const
Definition: GiDefaultContext.h:120
OdGeVector3d
Definition: GeVector3d.h:54
OdString
Definition: OdString.h:95
OdRxObject
Definition: RxObject.h:564
FacetModelerProfile2DBool::min
const T & min(const T &x, const T &y)
Definition: FMImpProfile2DBool.h:98
OdGiDefaultContext::SolidHatchAsPolygonMode
SolidHatchAsPolygonMode
Definition: GiDefaultContext.h:129
OdGiDefaultContext::drawText
virtual void drawText(OdGiConveyorGeometry *pDest, const OdGePoint3d &position, const OdGeVector3d &direction, const OdGeVector3d &upVector, const OdChar *msg, OdInt32 nLength, bool raw, const OdGiTextStyle *pTextStyle, const OdGeVector3d *pExtrusion)
TD_PackPop.h
OdGiDefaultContext::~OdGiDefaultContext
~OdGiDefaultContext()
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdGiCommonDraw
Definition: GiCommonDraw.h:572
DbRootExport.h
OdGiDefaultContext::getDatabaseByStub
virtual OdDbBaseDatabase * getDatabaseByStub(OdDbStub *objectId) const
OdGiConveyorGeometry
Definition: GiConveyorGeometry.h:270
OdGiTextStyle
Definition: GiTextStyle.h:52
OdGiDefaultContext::supportVerticalTTFText
virtual bool supportVerticalTTFText() const
Definition: GiDefaultContext.h:115
OdSmartPtr
Definition: SmartPtr.h:58
OdGiDefaultContext::kHatchTriangulation
@ kHatchTriangulation
Definition: GiDefaultContext.h:130
OdGePoint3d
Definition: GePoint3d.h:55
OdInt32
int OdInt32
Definition: OdPlatformSettings.h:782
OdGiDefaultContext::kHatchPolygon
@ kHatchPolygon
Definition: GiDefaultContext.h:131
OdGiDefaultContext::setPaletteBackground
virtual void setPaletteBackground(ODCOLORREF paletteBackground)=0
OdGiDefaultContext::getOwnerIDByStub
virtual OdDbStub * getOwnerIDByStub(OdDbStub *objectId) const
OdGiDefaultContext::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiDefaultContext)
OdGiDefaultContext::drawText
virtual void drawText(OdGiCommonDraw *pDraw, OdGePoint3d &position, const OdChar *msg, OdInt32 numBytes, const OdGiTextStyle *pTextStyle, OdUInt32 flags=0)
FacetModelerProfile2DBool::max
const T & max(const T &x, const T &y)
Definition: FMImpProfile2DBool.h:105
OdGiDefaultContext::getDefaultTextStyle
virtual void getDefaultTextStyle(OdGiTextStyle &textStyle)
OdChar
wchar_t OdChar
Definition: OdPlatformSettings.h:745
OdGiDefaultContext::drawText
virtual void drawText(OdGiCommonDraw *pDraw, OdGePoint3d &position, double height, double width, double oblique, const OdString &msg)
height
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
width
GLint GLenum GLsizei width
Definition: gles2_ext.h:110
GiCommonDraw.h
OdGiDefaultContext::getStubByID
virtual OdDbStub * getStubByID(OdUInt64 persistentId) const
TD_PackPush.h
OdGiDefaultContext::hatchAsPolygon
virtual SolidHatchAsPolygonMode hatchAsPolygon() const
Definition: GiDefaultContext.h:135
OdGiDefaultContext::isZeroTextNormals
virtual bool isZeroTextNormals() const
Definition: GiDefaultContext.h:113
OdGiDefaultContext::textExtentsBox
virtual void textExtentsBox(const OdGiTextStyle &textStyle, const OdChar *msg, int nLength, OdUInt32 flags, OdGePoint3d &min, OdGePoint3d &max, OdGePoint3d *pEndPos=0)
OdGiDefaultContext
Definition: GiDefaultContext.h:40
DBROOT_EXPORT
#define DBROOT_EXPORT
Definition: DbRootExport.h:39
OdGiDefaultContext::setHatchAsPolygon
virtual void setHatchAsPolygon(SolidHatchAsPolygonMode mode)
OdGiDefaultContext::enableGsModel
virtual void enableGsModel(bool enable)
ODCOLORREF
#define ODCOLORREF
Definition: OdPlatform.h:883
OdGiDefaultContext::getIDByStub
virtual OdUInt64 getIDByStub(OdDbStub *objectId) const
OdGiDefaultContext::shapeExtentsBox
virtual void shapeExtentsBox(const OdGiTextStyle &textStyle, int shapeNumber, OdGePoint3d &min, OdGePoint3d &max)
OdGiDefaultContext::paletteBackground
virtual ODCOLORREF paletteBackground() const =0
OdGiDefaultContextPtr
OdSmartPtr< OdGiDefaultContext > OdGiDefaultContextPtr
Definition: GiDefaultContext.h:147
OdGiDefaultContext::OdGiDefaultContext
OdGiDefaultContext()
OdGiDefaultContext::setPlotGeneration
virtual void setPlotGeneration(bool plotGeneration)=0
OdUInt64
Definition: Int64.h:137
OdGiDefaultContext::drawShape
virtual void drawShape(OdGiCommonDraw *pDraw, OdGePoint3d &position, int shapeNumber, const OdGiTextStyle *pTextStyle)