CFx SDK Documentation
2022 SP0
SDK
CFx
dd_inc
Tr
TrVisMetafilePlayback.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
// GLES2 metafile inverse converter
24
25
#ifndef ODTRVISMETAFILEPLAYBACK
26
#define ODTRVISMETAFILEPLAYBACK
27
28
#include "
TD_PackPush.h
"
29
30
#include "
TrVisDefs.h
"
31
#include "
TrVisMetafileStream.h
"
32
#include "
Gi/GiConveyorGeometry.h
"
33
#include "MetafileTransformStack.h"
34
35
class
OdTrVisTtfFontsCacheClient
;
36
44
class
OdTrVisMetafilePlaybackCallback
45
{
46
public
:
47
virtual
void
metafilePlayMetafile
(
OdTrVisDisplayId
/*metafileId*/
) { }
48
virtual
void
metafilePushTransform
(
const
OdGeMatrix3d
&
/*mTransform*/
) { }
49
virtual
void
metafilePopTransform
() { }
50
virtual
const
OdTrVisTtfFontsCacheClient
*
metafileTtfFontsCache
() {
return
NULL
; }
51
52
virtual
void
metafileProcessUserEntry
(
OdUInt32
/*dataLength*/
,
const
OdUInt8
*
/*pData*/
) { }
53
54
virtual
bool
metafileSelectMarker
(
OdTrVisGsMarker
/*gsMarker*/
,
const
OdBaseMetafileContainer *
/*pContainer*/
) {
return
true
; }
55
56
virtual
bool
metafilePointProc
(
const
OdGePoint3d
*
/*pVertex*/
) {
return
true
; }
57
virtual
bool
metafileLineProc
(
const
OdGePoint3d
*
/*pVertex*/
) {
return
true
; }
58
virtual
bool
metafileTriangleProc
(
const
OdGePoint3d
*
/*pVertex*/
) {
return
true
; }
59
virtual
bool
metafileGeomVisibility
(
OdTrVisGeomType
/*geomType*/
) {
return
true
; }
60
};
61
69
class
OdTrVisMetafilePlayback
70
{
71
public
:
72
enum
ConfFlags
73
{
74
kIgnoreSelGeom
= (1 << 0),
// Ignore selection-only geometry (can't be set with kIgnoreNonSelGeom)
75
kIgnoreNonSelGeom
= (1 << 1),
// Ignore geometry which can't be selected (can't be set with kIgnoreSelGeom)
76
kClientStream
= (1 << 2)
// Client-side metafile stream
77
};
78
protected
:
79
// Player->Owner communication
80
OdTrVisMetafilePlaybackCallback
*
m_pCallback
;
81
// Interprocess context for nested play() calls
82
struct
InprocRegisters
83
{
84
// Current selection markers
85
const
OdTrVisSelMark
*
pMarks
;
86
// Number of selection markers
87
OdUInt32
nMarks
;
88
// Processing flags
89
bool
bSuppressGeom
;
90
bool
bSelGeometry
;
91
92
// Default initializer
93
InprocRegisters
()
94
:
pMarks
(
NULL
),
nMarks
(0),
bSuppressGeom
(
false
),
bSelGeometry
(
false
)
95
{ }
96
}
m_inprocContext
;
97
// Configuration flags
98
OdUInt32
m_configFlags
;
99
public
:
100
OdTrVisMetafilePlayback
(
OdTrVisMetafilePlaybackCallback
*pCallback =
NULL
,
OdUInt32
configFlags
=
kIgnoreNonSelGeom
)
101
:
m_pCallback
(pCallback)
102
,
m_configFlags
(
configFlags
)
103
{
104
}
105
virtual
~OdTrVisMetafilePlayback
()
106
{
107
}
108
109
inline
void
setCallback
(
OdTrVisMetafilePlaybackCallback
*pCallback)
110
{
111
m_pCallback
= pCallback;
112
}
113
inline
OdTrVisMetafilePlaybackCallback
*
callback
()
const
114
{
115
return
m_pCallback
;
116
}
117
118
inline
void
setConfigFlags
(
OdUInt32
configFlags
)
119
{
120
m_configFlags
=
configFlags
;
121
}
122
inline
OdUInt32
configFlags
()
const
123
{
124
return
m_configFlags
;
125
}
126
127
bool
play
(
const
OdBaseMetafileContainer *pContainer,
bool
bCheckMarks =
true
);
128
protected
:
129
void
annihilateSelectionMarkers
(
InprocRegisters
&inprocCtx,
OdInt32
first,
OdInt32
count
);
130
};
131
139
class
OdTrVisMetafileConveyorPlayback
:
public
OdTrVisMetafilePlayback
,
protected
OdTrVisMetafilePlaybackCallback
140
{
141
protected
:
142
// Conveyor communication interfaces
143
OdGiConveyorGeometry
*
m_pGeom
;
144
OdGiConveyorContext
*
m_pCtx
;
145
// Actual readdress callback
146
OdTrVisMetafilePlaybackCallback
*
m_pActualCallback
;
147
// Callback redirection
148
virtual
void
metafilePlayMetafile
(
OdTrVisDisplayId
metafileId);
149
virtual
void
metafilePushTransform
(
const
OdGeMatrix3d
&mtx);
150
virtual
void
metafilePopTransform
();
151
virtual
const
OdTrVisTtfFontsCacheClient
*
metafileTtfFontsCache
();
152
virtual
void
metafileProcessUserEntry
(
OdUInt32
dataLength,
const
OdUInt8
*pData);
153
virtual
bool
metafileSelectMarker
(
OdTrVisGsMarker
gsMarker,
const
OdBaseMetafileContainer *pContainer);
154
// Internal callback implementations
155
virtual
bool
metafilePointProc
(
const
OdGePoint3d
*pVertex);
156
virtual
bool
metafileLineProc
(
const
OdGePoint3d
*pVertex);
157
virtual
bool
metafileTriangleProc
(
const
OdGePoint3d
*pVertex);
158
virtual
bool
metafileGeomVisibility
(
OdTrVisGeomType
geomType);
159
public
:
160
OdTrVisMetafileConveyorPlayback
(
OdTrVisMetafilePlaybackCallback
*pCallback =
NULL
)
161
:
OdTrVisMetafilePlayback
(
NULL
)
162
,
m_pActualCallback
(pCallback)
163
{
164
OdTrVisMetafilePlayback::setCallback
(
this
);
165
}
166
virtual
~OdTrVisMetafileConveyorPlayback
()
167
{
168
}
169
170
inline
void
setCallback
(
OdTrVisMetafilePlaybackCallback
*pCallback)
171
{
172
m_pActualCallback
= pCallback;
173
}
174
inline
OdTrVisMetafilePlaybackCallback
*
callback
()
const
175
{
176
return
m_pActualCallback
;
177
}
178
179
void
play
(
const
OdBaseMetafileContainer *pContainer,
OdGiConveyorGeometry
*pGeom,
OdGiConveyorContext
*pCtx,
bool
bCheckMarks =
true
);
180
};
181
182
#include "
TD_PackPop.h
"
183
184
#endif
// ODTRVISMETAFILEPLAYBACK
false
false
Definition:
DimVarDefs.h:165
GiConveyorGeometry.h
NULL
#define NULL
Definition:
GsProperties.h:177
OdUInt32
unsigned int OdUInt32
Definition:
OdPlatformSettings.h:783
OdInt32
int OdInt32
Definition:
OdPlatformSettings.h:782
OdUInt8
unsigned char OdUInt8
Definition:
OdPlatformSettings.h:759
TD_PackPop.h
TD_PackPush.h
TrVisDefs.h
TrVisMetafileStream.h
OdTrVisGeomType
OdTrVisGeomType
Definition:
TrVisMetafileStream.h:184
OdGeMatrix3d
Definition:
GeMatrix3d.h:73
OdGePoint3d
Definition:
GePoint3d.h:55
OdGiConveyorContext
Definition:
GiConveyorGeometry.h:54
OdGiConveyorGeometry
Definition:
GiConveyorGeometry.h:270
OdTrVisMetafileConveyorPlayback
Definition:
TrVisMetafilePlayback.h:140
OdTrVisMetafileConveyorPlayback::metafileTtfFontsCache
virtual const OdTrVisTtfFontsCacheClient * metafileTtfFontsCache()
OdTrVisMetafileConveyorPlayback::m_pActualCallback
OdTrVisMetafilePlaybackCallback * m_pActualCallback
Definition:
TrVisMetafilePlayback.h:146
OdTrVisMetafileConveyorPlayback::metafileTriangleProc
virtual bool metafileTriangleProc(const OdGePoint3d *pVertex)
OdTrVisMetafileConveyorPlayback::~OdTrVisMetafileConveyorPlayback
virtual ~OdTrVisMetafileConveyorPlayback()
Definition:
TrVisMetafilePlayback.h:166
OdTrVisMetafileConveyorPlayback::setCallback
void setCallback(OdTrVisMetafilePlaybackCallback *pCallback)
Definition:
TrVisMetafilePlayback.h:170
OdTrVisMetafileConveyorPlayback::metafileLineProc
virtual bool metafileLineProc(const OdGePoint3d *pVertex)
OdTrVisMetafileConveyorPlayback::OdTrVisMetafileConveyorPlayback
OdTrVisMetafileConveyorPlayback(OdTrVisMetafilePlaybackCallback *pCallback=NULL)
Definition:
TrVisMetafilePlayback.h:160
OdTrVisMetafileConveyorPlayback::metafilePopTransform
virtual void metafilePopTransform()
OdTrVisMetafileConveyorPlayback::metafilePlayMetafile
virtual void metafilePlayMetafile(OdTrVisDisplayId metafileId)
OdTrVisMetafileConveyorPlayback::callback
OdTrVisMetafilePlaybackCallback * callback() const
Definition:
TrVisMetafilePlayback.h:174
OdTrVisMetafileConveyorPlayback::metafileSelectMarker
virtual bool metafileSelectMarker(OdTrVisGsMarker gsMarker, const OdBaseMetafileContainer *pContainer)
OdTrVisMetafileConveyorPlayback::metafileGeomVisibility
virtual bool metafileGeomVisibility(OdTrVisGeomType geomType)
OdTrVisMetafileConveyorPlayback::m_pGeom
OdGiConveyorGeometry * m_pGeom
Definition:
TrVisMetafilePlayback.h:143
OdTrVisMetafileConveyorPlayback::metafilePushTransform
virtual void metafilePushTransform(const OdGeMatrix3d &mtx)
OdTrVisMetafileConveyorPlayback::m_pCtx
OdGiConveyorContext * m_pCtx
Definition:
TrVisMetafilePlayback.h:144
OdTrVisMetafileConveyorPlayback::play
void play(const OdBaseMetafileContainer *pContainer, OdGiConveyorGeometry *pGeom, OdGiConveyorContext *pCtx, bool bCheckMarks=true)
OdTrVisMetafileConveyorPlayback::metafileProcessUserEntry
virtual void metafileProcessUserEntry(OdUInt32 dataLength, const OdUInt8 *pData)
OdTrVisMetafileConveyorPlayback::metafilePointProc
virtual bool metafilePointProc(const OdGePoint3d *pVertex)
OdTrVisMetafilePlaybackCallback
Definition:
TrVisMetafilePlayback.h:45
OdTrVisMetafilePlaybackCallback::metafileSelectMarker
virtual bool metafileSelectMarker(OdTrVisGsMarker, const OdBaseMetafileContainer *)
Definition:
TrVisMetafilePlayback.h:54
OdTrVisMetafilePlaybackCallback::metafilePlayMetafile
virtual void metafilePlayMetafile(OdTrVisDisplayId)
Definition:
TrVisMetafilePlayback.h:47
OdTrVisMetafilePlaybackCallback::metafileProcessUserEntry
virtual void metafileProcessUserEntry(OdUInt32, const OdUInt8 *)
Definition:
TrVisMetafilePlayback.h:52
OdTrVisMetafilePlaybackCallback::metafileLineProc
virtual bool metafileLineProc(const OdGePoint3d *)
Definition:
TrVisMetafilePlayback.h:57
OdTrVisMetafilePlaybackCallback::metafileTtfFontsCache
virtual const OdTrVisTtfFontsCacheClient * metafileTtfFontsCache()
Definition:
TrVisMetafilePlayback.h:50
OdTrVisMetafilePlaybackCallback::metafilePushTransform
virtual void metafilePushTransform(const OdGeMatrix3d &)
Definition:
TrVisMetafilePlayback.h:48
OdTrVisMetafilePlaybackCallback::metafileTriangleProc
virtual bool metafileTriangleProc(const OdGePoint3d *)
Definition:
TrVisMetafilePlayback.h:58
OdTrVisMetafilePlaybackCallback::metafileGeomVisibility
virtual bool metafileGeomVisibility(OdTrVisGeomType)
Definition:
TrVisMetafilePlayback.h:59
OdTrVisMetafilePlaybackCallback::metafilePopTransform
virtual void metafilePopTransform()
Definition:
TrVisMetafilePlayback.h:49
OdTrVisMetafilePlaybackCallback::metafilePointProc
virtual bool metafilePointProc(const OdGePoint3d *)
Definition:
TrVisMetafilePlayback.h:56
OdTrVisMetafilePlayback
Definition:
TrVisMetafilePlayback.h:70
OdTrVisMetafilePlayback::m_inprocContext
struct OdTrVisMetafilePlayback::InprocRegisters m_inprocContext
OdTrVisMetafilePlayback::setCallback
void setCallback(OdTrVisMetafilePlaybackCallback *pCallback)
Definition:
TrVisMetafilePlayback.h:109
OdTrVisMetafilePlayback::ConfFlags
ConfFlags
Definition:
TrVisMetafilePlayback.h:73
OdTrVisMetafilePlayback::kIgnoreSelGeom
@ kIgnoreSelGeom
Definition:
TrVisMetafilePlayback.h:74
OdTrVisMetafilePlayback::kClientStream
@ kClientStream
Definition:
TrVisMetafilePlayback.h:76
OdTrVisMetafilePlayback::kIgnoreNonSelGeom
@ kIgnoreNonSelGeom
Definition:
TrVisMetafilePlayback.h:75
OdTrVisMetafilePlayback::play
bool play(const OdBaseMetafileContainer *pContainer, bool bCheckMarks=true)
OdTrVisMetafilePlayback::callback
OdTrVisMetafilePlaybackCallback * callback() const
Definition:
TrVisMetafilePlayback.h:113
OdTrVisMetafilePlayback::configFlags
OdUInt32 configFlags() const
Definition:
TrVisMetafilePlayback.h:122
OdTrVisMetafilePlayback::m_configFlags
OdUInt32 m_configFlags
Definition:
TrVisMetafilePlayback.h:98
OdTrVisMetafilePlayback::~OdTrVisMetafilePlayback
virtual ~OdTrVisMetafilePlayback()
Definition:
TrVisMetafilePlayback.h:105
OdTrVisMetafilePlayback::setConfigFlags
void setConfigFlags(OdUInt32 configFlags)
Definition:
TrVisMetafilePlayback.h:118
OdTrVisMetafilePlayback::annihilateSelectionMarkers
void annihilateSelectionMarkers(InprocRegisters &inprocCtx, OdInt32 first, OdInt32 count)
OdTrVisMetafilePlayback::m_pCallback
OdTrVisMetafilePlaybackCallback * m_pCallback
Definition:
TrVisMetafilePlayback.h:80
OdTrVisMetafilePlayback::OdTrVisMetafilePlayback
OdTrVisMetafilePlayback(OdTrVisMetafilePlaybackCallback *pCallback=NULL, OdUInt32 configFlags=kIgnoreNonSelGeom)
Definition:
TrVisMetafilePlayback.h:100
OdTrVisTtfFontsCacheClient
Definition:
TrVisTtfFontsCacheClient.h:36
OdUInt64
Definition:
Int64.h:137
count
GLsizei GLsizei * count
Definition:
gles2_ext.h:276
OdTrVisMarkBase
Definition:
TrVisMetafileStream.h:276
OdTrVisMetafilePlayback::InprocRegisters
Definition:
TrVisMetafilePlayback.h:83
OdTrVisMetafilePlayback::InprocRegisters::bSuppressGeom
bool bSuppressGeom
Definition:
TrVisMetafilePlayback.h:89
OdTrVisMetafilePlayback::InprocRegisters::nMarks
OdUInt32 nMarks
Definition:
TrVisMetafilePlayback.h:87
OdTrVisMetafilePlayback::InprocRegisters::bSelGeometry
bool bSelGeometry
Definition:
TrVisMetafilePlayback.h:90
OdTrVisMetafilePlayback::InprocRegisters::InprocRegisters
InprocRegisters()
Definition:
TrVisMetafilePlayback.h:93
OdTrVisMetafilePlayback::InprocRegisters::pMarks
const OdTrVisSelMark * pMarks
Definition:
TrVisMetafilePlayback.h:85
Generated on Fri Jan 22 2021 18:01:50