CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
BrepRendererImpl.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
24
25#ifndef _ODBREPRENDERERIMPL_INCLUDED_
26#define _ODBREPRENDERERIMPL_INCLUDED_
27
28#include "Wr/wrExport.h"
29#include "BrepRenderer.h"
30
31class OdBrBrep;
32
33class wrRenderCache;
34class OdGiCommonDraw ;
37class OdGeMatrix3d;
38
39#include "TD_PackPush.h"
40#include "Gi/GiCommonDraw.h"
41
42class wrRenderCacheElement;
43namespace GeMesh { class OdGeTrMesh; }
44class OdGeExtents3d;
45
54{
55public:
56 enum Mode
57 {
59 kBIM = 1
60 };
61private:
62 const OdBrBrep *m_pBrep;
63 bool m_enableCache;
64 wrTriangulationParams m_pTriangulationParams;
65 const wrTriangulationParams* m_pTriangulationParamsGlobal; // this pointer is for old tessellation back-compatibility
66 wrRenderCache *m_pCache;
67 wrRenderCache *m_pFaceMeshCache;
68 Mode m_Mode;
69 OdDbBaseDatabase *m_pDb;
70 wrRenderFilter *m_pFaceFilter;
71 double m_facetRes; // 0 - use deviation from triangulation params, non-zero - use "lazy" deviation
72
73public:
74
77
78 void setDatabase(OdDbBaseDatabase *pDb) { m_pDb = pDb; }
79
82
83 virtual void setBrep(const OdBrBrep& brep);
84
85 virtual void enableCaching();
86 virtual void disableCaching(bool clearCache = true);
87 virtual bool isCachingEnabled() const;
88
89 virtual void setTriangulationParams(const wrTriangulationParams *pTriangulationParams);
90
92
93 virtual bool draw(OdGiCommonDraw * pWd, OdUInt32 geomType, const NumIsolines *pNumIsolines = 0);
94
96
97 virtual void transformBy(const OdGeMatrix3d &xfm);
98
99 virtual bool drawFace(OdGiCommonDraw * pWd, OdGsMarker iFace, const wrTriangulationParams& triangulationParams);
100 virtual bool getFaceMesh(GeMesh::OdGeTrMesh& mesh, OdGsMarker iFace, const wrTriangulationParams& triangulationParams);
101
102 virtual bool getExtents(OdGeExtents3d& extents, OdUInt32 nIso = 6);
103 virtual void setFaceFilter(wrRenderFilter* pFaceFilter);
104
105 virtual bool getPtSurface(OdGePoint3d& pt); // get the point for calculating deviation in perspective mode
106
128 bool getLoopTypes(const OdBrFace& face, OdArray< std::pair<int, int> >& aLoopType);
129
138 bool getDeviation(OdGiCommonDraw* pWd, double& deviation);
139
147 void setLazyDeviation(double facetRes);
148};
149
150#include "TD_PackPop.h"
151
152#endif //_ODBREPRENDERERIMPL_INCLUDED_
@ kDefault
Definition: BrEnums.h:132
ptrdiff_t OdGsMarker
unsigned int OdUInt32
OdBrepRendererImpl::Mode mode() const
void setLazyDeviation(double facetRes)
virtual void disableCaching(bool clearCache=true)
virtual bool getPtSurface(OdGePoint3d &pt)
void setDatabase(OdDbBaseDatabase *pDb)
virtual void enableCaching()
virtual bool draw(OdGiCommonDraw *pWd, OdUInt32 geomType, const NumIsolines *pNumIsolines=0)
virtual ~OdBrepRendererImpl()
virtual bool getFaceMesh(GeMesh::OdGeTrMesh &mesh, OdGsMarker iFace, const wrTriangulationParams &triangulationParams)
virtual void setTriangulationParams(const wrTriangulationParams *pTriangulationParams)
virtual void setFaceFilter(wrRenderFilter *pFaceFilter)
void setMode(OdBrepRendererImpl::Mode m)
virtual bool drawSilhouettes(OdGiViewportDraw *pVd)
virtual bool isCachingEnabled() const
virtual void setBrep(const OdBrBrep &brep)
bool getLoopTypes(const OdBrFace &face, OdArray< std::pair< int, int > > &aLoopType)
virtual const wrTriangulationParams * getTriangulationParams() const
virtual void transformBy(const OdGeMatrix3d &xfm)
virtual bool getExtents(OdGeExtents3d &extents, OdUInt32 nIso=6)
virtual bool drawFace(OdGiCommonDraw *pWd, OdGsMarker iFace, const wrTriangulationParams &triangulationParams)
bool getDeviation(OdGiCommonDraw *pWd, double &deviation)
#define RENDER_EXPORT
Definition: wrExport.h:40