CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
BrepRendererImpl.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, 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-2024 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 bool m_bNewIsolinesMode;
73
74public:
75
78
79 void setDatabase(OdDbBaseDatabase *pDb) { m_pDb = pDb; }
80
83
84 virtual void setBrep(const OdBrBrep& brep);
85
86 virtual void enableCaching();
87 virtual void disableCaching(bool clearCache = true);
88 virtual bool isCachingEnabled() const;
89
90 virtual void setTriangulationParams(const wrTriangulationParams *pTriangulationParams);
91
93
94 virtual bool draw(OdGiCommonDraw * pWd, OdUInt32 geomType, const NumIsolines *pNumIsolines = 0);
95
97
98 virtual void transformBy(const OdGeMatrix3d &xfm);
99
100 virtual bool drawFace(OdGiCommonDraw * pWd, OdGsMarker iFace, const wrTriangulationParams& triangulationParams);
101 virtual bool getFaceMesh(GeMesh::OdGeTrMesh& mesh, OdGsMarker iFace, const wrTriangulationParams& triangulationParams);
102
103 virtual bool getExtents(OdGeExtents3d& extents, OdUInt32 nIso = 6);
104 virtual void setFaceFilter(wrRenderFilter* pFaceFilter);
105
106 virtual bool getPtSurface(OdGePoint3d& pt); // get the point for calculating deviation in perspective mode
107
129 bool getLoopTypes(const OdBrFace& face, OdArray< std::pair<int, int> >& aLoopType);
130
140 bool getDeviation(OdGiCommonDraw* pWd, bool bIsolinesMode, double& deviation);
141
149 void setLazyDeviation(double facetRes);
150
151 void setNewIsolinesMode(bool bMode = true);
152 bool newIsolinesMode() const;
153};
154
155#include "TD_PackPop.h"
156
157#endif //_ODBREPRENDERERIMPL_INCLUDED_
OdRxObject OdDbBaseDatabase
ptrdiff_t OdGsMarker
unsigned int OdUInt32
OdBrepRendererImpl::Mode mode() const
void setLazyDeviation(double facetRes)
bool getDeviation(OdGiCommonDraw *pWd, bool bIsolinesMode, double &deviation)
virtual void disableCaching(bool clearCache=true)
void setNewIsolinesMode(bool bMode=true)
virtual bool getPtSurface(OdGePoint3d &pt)
bool newIsolinesMode() const
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)
#define RENDER_EXPORT
Definition wrExport.h:40