CFx SDK Documentation
2023 SP0
SDK
CFx
dd_inc
Gi
GiMetafiler.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 __OD_GI_METAFILER__
25
#define __OD_GI_METAFILER__
26
27
#include "
Gi/GiConveyorNode.h
"
28
#include "
ChunkAllocator.h
"
29
#include "
Ge/GeDoubleArray.h
"
30
31
class
OdGiDeviation
;
32
33
#include "
TD_PackPush.h
"
34
39
class
ODGI_EXPORT
OdGiGeometryMetafile
:
public
OdRxObject
40
{
41
public
:
42
ODRX_DECLARE_MEMBERS
(
OdGiGeometryMetafile
);
43
44
ODCA_HEAP_OPERATORS
();
45
46
class
Record
47
{
48
protected
:
49
Record
*
m_pTail
;
50
public
:
51
ODRX_HEAP_OPERATORS
();
52
53
Record
()
54
: m_pTail(0)
55
{}
56
57
virtual
~Record
() {}
58
59
Record
*
tail
()
60
{
61
return
m_pTail;
62
}
63
64
const
Record
*
tail
()
const
65
{
66
return
m_pTail;
67
}
68
69
void
setTail
(
Record
* pTail)
70
{
71
m_pTail = pTail;
72
}
73
74
inline
void
deleteList
()
75
{
76
Record
* pCurr =
this
;
77
while
(pCurr)
78
{
79
Record
* pTail = pCurr->
m_pTail
;
80
delete
pCurr;
81
pCurr = pTail;
82
}
83
}
84
85
virtual
void
play
(
OdGiConveyorGeometry
* pGeom,
OdGiConveyorContext
* pCtx)
const
= 0;
86
87
virtual
OdUInt64
recordSize
()
const
{
return
(
OdUInt64
)
sizeof
(*this); }
88
};
89
90
private
:
91
Record* m_pHead;
92
93
void
destroyRecords()
94
{
95
if
(m_pHead)
96
{
97
m_pHead->deleteList();
98
m_pHead =
NULL
;
99
}
100
}
101
102
public
:
103
104
OdGiGeometryMetafile
();
105
virtual
~OdGiGeometryMetafile
();
106
107
void
clear
();
108
void
play
(
OdGiConveyorGeometry
* pGeom,
OdGiConveyorContext
* pCtx)
const
;
109
virtual
OdUInt64
metafileSize
()
const
;
110
void
setRecords
(
Record
* pRec)
111
{
112
ODA_ASSERT
(m_pHead == 0);
113
m_pHead = pRec;
114
}
115
bool
isEmpty
()
const
{
return
m_pHead == 0; }
116
Record
*
firstRecord
()
const
{
return
m_pHead; }
117
Record
*
lastRecord
()
const
;
118
};
119
123
typedef
OdSmartPtr<OdGiGeometryMetafile>
OdGiGeometryMetafilePtr
;
124
129
class
ODGI_EXPORT
OdGiMetafiler
:
public
OdGiConveyorNode
130
{
131
public
:
132
ODRX_DECLARE_MEMBERS
(
OdGiMetafiler
);
133
134
virtual
void
setMetafile
(
OdGiGeometryMetafile
* pMetafile) = 0;
135
virtual
OdGiGeometryMetafile
*
metafile
() = 0;
136
137
virtual
void
exchangeMetafile
(
OdGiGeometryMetafile
* pMetafile) = 0;
138
141
virtual
void
setDeviation
(
const
OdGeDoubleArray
& deviations) = 0;
142
145
virtual
void
setDeviation
(
const
OdGiDeviation
* pDeviation) = 0;
146
149
virtual
void
setDrawContext
(
OdGiConveyorContext
* pDrawCtx) = 0;
150
151
enum
CoordType
152
{
153
kUnknown
= 0,
154
kModel
,
155
kWorld
,
156
kEye
,
157
kDevice
158
};
159
162
virtual
void
setCoordinatesType
(
CoordType
ct) = 0;
163
166
virtual
CoordType
coordinatesType
()
const
= 0;
167
170
virtual
bool
saveTraits
(
const
OdGiSubEntityTraitsData
& entTraits,
const
OdGiSubEntityTraitsData
*byBlockTraits =
NULL
) = 0;
173
virtual
bool
saveTraits
(
const
OdGiSubEntityTraitsData
*byBlockTraits) = 0;
176
virtual
bool
saveTraits
() = 0;
177
180
virtual
void
flush
(
bool
bForceTraits =
true
) = 0;
181
184
virtual
void
add
(
OdGiGeometryMetafile::Record
* pRec) = 0;
185
};
186
190
typedef
OdSmartPtr<OdGiMetafiler>
OdGiMetafilerPtr
;
191
192
#include "
TD_PackPop.h
"
193
194
#endif
//#ifndef __OD_GI_METAFILER__
ChunkAllocator.h
ODA_ASSERT
#define ODA_ASSERT(exp)
Definition:
DebugStuff.h:49
CategoryType::kUnknown
@ kUnknown
GeDoubleArray.h
GiConveyorNode.h
ODGI_EXPORT
#define ODGI_EXPORT
Definition:
GiExport.h:35
OdGiMetafilerPtr
OdSmartPtr< OdGiMetafiler > OdGiMetafilerPtr
Definition:
GiMetafiler.h:190
OdGiGeometryMetafilePtr
OdSmartPtr< OdGiGeometryMetafile > OdGiGeometryMetafilePtr
Definition:
GiMetafiler.h:123
NULL
#define NULL
Definition:
GsProperties.h:177
TD_PackPop.h
TD_PackPush.h
OdArray< double, OdMemoryAllocator< double > >
OdGiConveyorContext
Definition:
GiConveyorGeometry.h:54
OdGiConveyorGeometry
Definition:
GiConveyorGeometry.h:270
OdGiConveyorNode
Definition:
GiConveyorNode.h:84
OdGiDeviation
Definition:
GiDeviation.h:44
OdGiGeometryMetafile::Record
Definition:
GiMetafiler.h:47
OdGiGeometryMetafile::Record::setTail
void setTail(Record *pTail)
Definition:
GiMetafiler.h:69
OdGiGeometryMetafile::Record::Record
Record()
Definition:
GiMetafiler.h:53
OdGiGeometryMetafile::Record::ODRX_HEAP_OPERATORS
ODRX_HEAP_OPERATORS()
OdGiGeometryMetafile::Record::~Record
virtual ~Record()
Definition:
GiMetafiler.h:57
OdGiGeometryMetafile::Record::m_pTail
Record * m_pTail
Definition:
GiMetafiler.h:49
OdGiGeometryMetafile::Record::tail
const Record * tail() const
Definition:
GiMetafiler.h:64
OdGiGeometryMetafile::Record::deleteList
void deleteList()
Definition:
GiMetafiler.h:74
OdGiGeometryMetafile::Record::recordSize
virtual OdUInt64 recordSize() const
Definition:
GiMetafiler.h:87
OdGiGeometryMetafile::Record::play
virtual void play(OdGiConveyorGeometry *pGeom, OdGiConveyorContext *pCtx) const =0
OdGiGeometryMetafile::Record::tail
Record * tail()
Definition:
GiMetafiler.h:59
OdGiGeometryMetafile
Definition:
GiMetafiler.h:40
OdGiGeometryMetafile::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiGeometryMetafile)
OdGiGeometryMetafile::firstRecord
Record * firstRecord() const
Definition:
GiMetafiler.h:116
OdGiGeometryMetafile::setRecords
void setRecords(Record *pRec)
Definition:
GiMetafiler.h:110
OdGiGeometryMetafile::play
void play(OdGiConveyorGeometry *pGeom, OdGiConveyorContext *pCtx) const
OdGiGeometryMetafile::OdGiGeometryMetafile
OdGiGeometryMetafile()
OdGiGeometryMetafile::isEmpty
bool isEmpty() const
Definition:
GiMetafiler.h:115
OdGiGeometryMetafile::lastRecord
Record * lastRecord() const
OdGiGeometryMetafile::~OdGiGeometryMetafile
virtual ~OdGiGeometryMetafile()
OdGiGeometryMetafile::ODCA_HEAP_OPERATORS
ODCA_HEAP_OPERATORS()
OdGiGeometryMetafile::metafileSize
virtual OdUInt64 metafileSize() const
OdGiGeometryMetafile::clear
void clear()
OdGiMetafiler
Definition:
GiMetafiler.h:130
OdGiMetafiler::metafile
virtual OdGiGeometryMetafile * metafile()=0
OdGiMetafiler::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiMetafiler)
OdGiMetafiler::saveTraits
virtual bool saveTraits()=0
OdGiMetafiler::add
virtual void add(OdGiGeometryMetafile::Record *pRec)=0
OdGiMetafiler::flush
virtual void flush(bool bForceTraits=true)=0
OdGiMetafiler::setDrawContext
virtual void setDrawContext(OdGiConveyorContext *pDrawCtx)=0
OdGiMetafiler::setCoordinatesType
virtual void setCoordinatesType(CoordType ct)=0
OdGiMetafiler::coordinatesType
virtual CoordType coordinatesType() const =0
OdGiMetafiler::saveTraits
virtual bool saveTraits(const OdGiSubEntityTraitsData &entTraits, const OdGiSubEntityTraitsData *byBlockTraits=NULL)=0
OdGiMetafiler::CoordType
CoordType
Definition:
GiMetafiler.h:152
OdGiMetafiler::kModel
@ kModel
Definition:
GiMetafiler.h:154
OdGiMetafiler::kWorld
@ kWorld
Definition:
GiMetafiler.h:155
OdGiMetafiler::kEye
@ kEye
Definition:
GiMetafiler.h:156
OdGiMetafiler::saveTraits
virtual bool saveTraits(const OdGiSubEntityTraitsData *byBlockTraits)=0
OdGiMetafiler::setDeviation
virtual void setDeviation(const OdGeDoubleArray &deviations)=0
OdGiMetafiler::exchangeMetafile
virtual void exchangeMetafile(OdGiGeometryMetafile *pMetafile)=0
OdGiMetafiler::setMetafile
virtual void setMetafile(OdGiGeometryMetafile *pMetafile)=0
OdGiMetafiler::setDeviation
virtual void setDeviation(const OdGiDeviation *pDeviation)=0
OdGiSubEntityTraitsData
Definition:
GiSubEntityTraitsData.h:73
OdRxObject
Definition:
RxObject.h:583
OdSmartPtr
Definition:
SmartPtr.h:58
OdUInt64
Definition:
Int64.h:137
Generated on Thu Feb 24 2022 15:09:33