CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
TrRndLocalRenditionHost.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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// Renderer local host
24
25#ifndef ODTRRNDLOCALRENDITIONHOST
26#define ODTRRNDLOCALRENDITIONHOST
27
28#include "TD_PackPush.h"
29
30#include "TPtr.h"
31#include "../TrVisRendition.h"
32#include "TrRndLocalContext.h"
35
36// Forward declaration
39
44{
45 public:
46 // Returns managed rendition
48 virtual const OdTrVisRendition *rendition() const = 0;
49
50 // Returns render settings manager
53
54 // Context data storage management
55 virtual bool hasContextData() const = 0;
56 virtual void processContextData(bool bStore) = 0;
57
58 // Resource accessors
59 virtual bool getMetafileDef(OdTrVisMetafileId metafileId, OdTrVisMetafileDef &mfDef) const = 0;
60 virtual bool getMaterialDef(OdTrVisMaterialId materialId, OdTrVisMaterialDef &mtDef) const = 0;
61
62 // Property accessors
63 virtual OdUInt32 hasProperties(OdTrVisRendition::DataType dataType, OdTrVisId resId) const = 0;
65 OdTrVisPropertyDef *&pPropDef) const = 0;
66 // Ability to make shareable properties clone
67 virtual bool supportShallowPropertiesClone(OdTrVisMetafileContainer *pMfStream) const = 0;
69
70 // Return supported data formats (bit mask, represents data type sizes in bytes)
72 { if (type > OdTrVisArrayWrapper::Type_Index) return 0;
73 else if (type < OdTrVisArrayWrapper::Type_Index) return 4;
74 return 2; }
75 // Returns external arrays manager
76 virtual const OdTrRndExternalArraysManager &externalArraysManager() const { return *this; }
77};
78
83{
84 public:
85 // Returns optional local context
87 // Returns optional resource sharing provider (for multiple devices session sharing)
89 // Returns optional highlighting and visibility branches interface (if true, rendition will be initialized as Gs-based)
91
92 // Predefined textures generation
93 virtual bool generateLinetypeTexture(OdPs::LineType /*ltpId*/, OdUInt8Array& /*outPixels*/, OdUInt8 /*forePixVal*/) const { return false; }
94 virtual bool generateFilltypeTexture(OdPs::FillStyle /*fsId*/, OdUInt8Array& /*outPixels*/, OdUInt32 /*dimX*/, OdUInt32 /*dimY*/, OdUInt8 /*forePixVal*/) const { return false; }
95};
96
101
106{
107 public:
108 static void addRef(OdTrRndLocalRenditionHost* pObj) { if (pObj) pObj->rendition()->addRef(); }
109 static void release(OdTrRndLocalRenditionHost* pObj) { if (pObj) pObj->rendition()->release(); }
110};
111
115class OdTrRndLocalRenditionHostPtr : public TPtr<OdTrRndLocalRenditionHost, OdTrRndLocalRenditionHostTPtrAdaptor>
116{
117 public:
129};
130
131#include "TD_PackPop.h"
132
133#endif // ODTRRNDLOCALRENDITIONHOST
unsigned int OdUInt32
unsigned char OdUInt8
OdSmartPtr< OdTrRndLocalContext > OdTrRndLocalContextPtr
OdSmartPtr< OdTrRndLocalRenditionClient > OdTrRndLocalRenditionClientPtr
OdSmartPtr< OdTrRndStateBranchClient > OdTrRndStateBranchClientPtr
OdSmartPtr< OdTrVisSharingProviderClient > OdTrVisSharingProviderClientPtr
virtual void release()=0
virtual void addRef()=0
virtual OdTrRndStateBranchClientPtr stateBranchClient()
virtual bool generateFilltypeTexture(OdPs::FillStyle, OdUInt8Array &, OdUInt32, OdUInt32, OdUInt8) const
virtual OdTrRndLocalContextPtr createLocalContext(OdTrVisRenderClient *)
virtual bool generateLinetypeTexture(OdPs::LineType, OdUInt8Array &, OdUInt8) const
virtual OdTrVisSharingProviderClientPtr createSharingProvider()
virtual bool supportShallowPropertiesClone(OdTrVisMetafileContainer *pMfStream) const =0
virtual bool hasContextData() const =0
virtual void processContextData(bool bStore)=0
virtual OdTrRndRenderSettingsManager * renderSettingsManager()=0
virtual bool getMetafileDef(OdTrVisMetafileId metafileId, OdTrVisMetafileDef &mfDef) const =0
virtual const OdTrRndRenderSettingsManager * renderSettingsManager() const =0
virtual const OdTrVisRendition * rendition() const =0
virtual bool getMaterialDef(OdTrVisMaterialId materialId, OdTrVisMaterialDef &mtDef) const =0
virtual bool shallowPropertiesClone(OdTrVisMetafileContainer *pMfStream)=0
virtual OdUInt32 supportedDataFormat(OdTrVisArrayWrapper::Type type) const
virtual OdUInt32 hasProperties(OdTrVisRendition::DataType dataType, OdTrVisId resId) const =0
virtual const OdTrRndExternalArraysManager & externalArraysManager() const
virtual bool getPropertyDef(OdTrVisRendition::DataType dataType, OdTrVisId resId, OdTrVisPropertyDef::PropertyType propType, OdTrVisPropertyDef *&pPropDef) const =0
virtual OdTrVisRendition * rendition()=0
OdTrRndLocalRenditionHostPtr & operator=(OdTrRndLocalRenditionHost *pObj)
OdTrRndLocalRenditionHostPtr(const OdTrRndLocalRenditionHost *pObj, bool bAttach=false)
OdTrRndLocalRenditionHostPtr(const OdTrRndLocalRenditionHostPtr &ref)
static void release(OdTrRndLocalRenditionHost *pObj)
static void addRef(OdTrRndLocalRenditionHost *pObj)
Definition: TPtr.h:76
TPtr & operator=(TObj *pObj)
Definition: TPtr.h:103
GLenum GLint ref
Definition: gles2_ext.h:262
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
LineType
Definition: PlotStyles.h:89
FillStyle
Definition: PlotStyles.h:53