/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef _COLLADA_EXPORT_VIEW_INCLUDED_ #define _COLLADA_EXPORT_VIEW_INCLUDED_ #pragma once #include "OdaCommon.h" #include "Gi/GiRasterImage.h" #include "Gi/GiDrawable.h" #include "Gi/GiGeometrySimplifier.h" #include "Gi/GiUtils.h" #include "Gs/GsBaseVectorizer.h" #include "Gs/GsBaseMaterialView.h" #include "RxDynamicModule.h" #include "COLLADASWEffectProfile.h" #include "LightExporter.h" /** \details Provides a set of classes, structures and enumerations for exporting to Collada files. */ namespace TD_COLLADA_EXPORT { /** Count of Collada entities. */ static OdUInt64 iColladaEntCounter = 0; /** \details This structure implements the material data for exporting to Collada files. */ struct MaterialData { private: /** Original material ID. */ OdUInt64 m_orgMatId; public: /** Ambient color. */ COLLADASW::Color ambientColor; /** Diffuse color. */ COLLADASW::Color diffuseColor; /** Specular color. */ COLLADASW::Color specularColor; /** Diffuse file source. */ OdString sDiffuseFileSource; /** Specular file source. */ OdString sSpecularFileSource; /** Reflection file source. */ OdString sReflectionFileSource; /** Availability of a bump file source. */ OdString sBumpFileSource; /** Opacity file source. */ OdString sOpacityFileSource; /** Emission file source. */ OdString sEmissionFileSource; /** Refraction file source. */ OdString sRefractionFileSource; /** Ambient color factor. */ double dAmbientColorFactor; /** Diffuse color factor. */ double dDiffuseColorFactor; /** Specular color factor. */ double dSpecularColorFactor; /** Opacity percentage. */ double dOpacityPercentage; /** Bump percentage. */ double dBumpPercentage; /** Gloss factor. */ double dGlossFactor; /** Reflection percentage. */ double dReflectionPercentage; /** Emission percentage. */ double dEmissionPercentage; /** Refraction index. */ double dRefractionIndex; /** Translucence. */ double dTranslucence; /** Availability of a diffuse texture. */ bool bDiffuseHasTexture; /** Availability of a specular texture. */ bool bSpecularHasTexture; /** Availability of an ambient channel. */ bool bAmbientChannelEnabled; /** Availability of a diffuse channel. */ bool bDiffuseChannelEnabled; /** Availability of a specular channel. */ bool bSpecularChannelEnabled; /** Availability of an opacity channel. */ bool bOpacityChannelEnabled; /** Availability of an opacity texture. */ bool bOpacityHasTexture; /** Availability of a reflection channel. */ bool bReflectionChannelEnabled; /** Availability of a reflection texture. */ bool bReflectionHasTexture; /** Availability of a bump channel. */ bool bBumpChannelEnabled; /** Availability of a bump texture. */ bool bBumpHasTexture; /** Availability of an emission channel. */ bool bEmissionChannelEnabled; /** Availability of an emission texture. */ bool bEmissionHasTexture; /** Availability of a refraction channel. */ bool bRefractionChannelEnabled; /** Availability of a refraction texture. */ bool bRefractionHasTexture; /** \details Returns material id in the database. */ OdUInt64 getOriginalMatId() const { return m_orgMatId; } /** \details Set material id from the database. */ void setOriginalMatId(OdUInt64 id) { m_orgMatId = id; } /** \details Comparison operator for the MaterialData object. \returns A boolean value that indicates whether the input MaterialData is identical to this MaterialData. */ bool operator ==(MaterialData& val) const { return //m_orgMatId == val.m_orgMatId && bAmbientChannelEnabled == val.bAmbientChannelEnabled && (bAmbientChannelEnabled ? (ambientColor == val.ambientColor && OdEqual(dAmbientColorFactor, val.dAmbientColorFactor)) : true) && bDiffuseChannelEnabled == val.bDiffuseChannelEnabled && (bDiffuseChannelEnabled ? (diffuseColor == val.diffuseColor && OdEqual(dDiffuseColorFactor, val.dDiffuseColorFactor) && bDiffuseHasTexture == val.bDiffuseHasTexture && (bDiffuseHasTexture ? sDiffuseFileSource == val.sDiffuseFileSource : true)) : true) && bSpecularChannelEnabled == val.bSpecularChannelEnabled && (bSpecularChannelEnabled ? (specularColor == val.specularColor && OdEqual(dSpecularColorFactor, val.dSpecularColorFactor) && OdEqual(dGlossFactor, val.dGlossFactor) && bSpecularHasTexture == val.bSpecularHasTexture && (bSpecularHasTexture ? sSpecularFileSource == val.sSpecularFileSource : true)) : true) && bOpacityChannelEnabled == val.bOpacityChannelEnabled && (bOpacityChannelEnabled ? (OdEqual(dOpacityPercentage, val.dOpacityPercentage) && bOpacityHasTexture == val.bOpacityHasTexture && (bOpacityHasTexture ? sOpacityFileSource == val.sOpacityFileSource : true)) : true) && bReflectionChannelEnabled == val.bReflectionChannelEnabled && (bReflectionChannelEnabled ? (OdEqual(dReflectionPercentage, val.dReflectionPercentage) && bReflectionHasTexture == val.bReflectionHasTexture && (bReflectionHasTexture ? sReflectionFileSource == val.sReflectionFileSource : true)) : true) && bBumpChannelEnabled == val.bBumpChannelEnabled && (bBumpChannelEnabled ? (OdEqual(dBumpPercentage, val.dBumpPercentage) && bBumpHasTexture == val.bBumpHasTexture && (bBumpHasTexture ? sBumpFileSource == val.sBumpFileSource : true)) : true) && bRefractionChannelEnabled == val.bRefractionChannelEnabled && (bRefractionChannelEnabled ? (OdEqual(dRefractionIndex, val.dRefractionIndex) && bRefractionHasTexture == val.bRefractionHasTexture && (bRefractionHasTexture ? sRefractionFileSource == val.sRefractionFileSource : true)) : true) && bEmissionChannelEnabled == val.bEmissionChannelEnabled && (bEmissionChannelEnabled ? (OdEqual(dEmissionPercentage, val.dEmissionPercentage) && bEmissionHasTexture == val.bEmissionHasTexture && (bEmissionHasTexture ? sEmissionFileSource == val.sEmissionFileSource : true)) : true) && OdEqual(dTranslucence, val.dTranslucence); } /** \details Creates a new instance of a MaterialData object with the default parameters. */ MaterialData() : m_orgMatId(0), dAmbientColorFactor(0.0), dDiffuseColorFactor(0.0), dSpecularColorFactor(0.0), dOpacityPercentage(0.0), dBumpPercentage(0.0), dGlossFactor(0.0), dReflectionPercentage(0.0), dEmissionPercentage(0.0), dRefractionIndex(0.0), dTranslucence(0.0), bDiffuseHasTexture(false), bSpecularHasTexture(false), bAmbientChannelEnabled(false), bDiffuseChannelEnabled(false), bSpecularChannelEnabled(false), bOpacityChannelEnabled(false), bOpacityHasTexture(false), bReflectionChannelEnabled(false), bReflectionHasTexture(false), bBumpChannelEnabled(false), bBumpHasTexture(false), bEmissionChannelEnabled(false), bEmissionHasTexture(false), bRefractionChannelEnabled(false), bRefractionHasTexture(false) {} }; /** \details Defines flags of the material. */ enum Flags { /** Raster image. */ kRasterImage = 1, /** Raster image material. */ kRasterImageMat = 2, /** Entity. */ kAddEntity = 4 }; /** \details This structure implements the material mapper for exporting to a Collada file. */ struct ColladaMaterialMapper { /** Points of the texture coordinates. */ OdGePoint2dArray m_ptTextureCoordArr; /** Indexes of the texture coordinates. */ OdUInt32Array m_indTextureCoordArr; }; /** \details This structure stores the entity data for exporting to a Collada file. */ struct ColladaEntData { private: /** Original drawable ID. */ OdUInt64 m_orgId; /** Index of the entity material. */ unsigned int m_iEntMaterial; /** Original material ID. */ OdUInt64 m_orgMatId; public: /** All points extent */ OdGeExtents3d m_extents; /** Matrix for geometry 3D transformation. */ OdGeMatrix3d m_matTransform; /** Array of the number of vertices on faces. */ OdUInt64Array m_numVtxOnFaceArr; /** Array of points. */ OdGePoint3dArray m_ptArr; /** Array of the points' indexes. */ OdUInt32Array m_indPtsArr; /** Array of the points' normals. */ OdGeVector3dArray m_normVtxArr; /** Array of the normals' indexes. */ OdUInt32Array m_indVtxNormArr; /** Array of the normals' indexes. */ ColladaMaterialMapper m_pDiffuseMaterialMapperArr; /** Entity ID. */ OdUInt64 m_iId; /** Original material symbol for instance entity */ OdString m_strMatSymbol; /** Flag that states whether an entity is a polyline or a polygon. */ bool m_bIsPolyline; /** Flag that this ColladaEntData is an instance of an existing geometry, but with its own matrix. */ bool m_bIsInstance; /** \details Creates a new instance of a ColladaEntData object with the default parameters. */ ColladaEntData() : m_orgId(0), m_iEntMaterial(0), m_orgMatId(0), m_iId(0), m_bIsPolyline(false), m_bIsInstance(false){} OdUInt64 getOriginalId() const { return m_orgId; } void setOriginalId(OdUInt64 id) { m_orgId = id; } void getMaterialId(unsigned int& iMatIndex, OdUInt64& iOrgMatId) const { iMatIndex = m_iEntMaterial; iOrgMatId = m_orgMatId; } unsigned int getMaterialIndex() const { return m_iEntMaterial; } OdUInt64 getOriginalMatId() const { return m_orgMatId; } void setMaterialId(unsigned int iMatIndex, OdUInt64 iOrgMatId) { m_iEntMaterial = iMatIndex; m_orgMatId = iOrgMatId; } OdString getMaterialIdStr() const { OdString str; str.format(OD_T("%i-%i"), m_iEntMaterial+1, m_orgMatId); return str; } void normalizeGeometry() { if (m_ptArr.isEmpty() || !m_extents.isValidExtents() || !needToNormalize(m_extents)) return; OdGePoint3d basePnt = m_extents.center(); m_matTransform *= OdGeMatrix3d::translation(basePnt - OdGePoint3d::kOrigin); OdGeMatrix3d matrInv = OdGeMatrix3d::translation(OdGePoint3d::kOrigin - basePnt); for (OdGePoint3d& pnt : m_ptArr) pnt.transformBy(matrInv); } bool needToNormalize(const OdGeExtents3d& extents) { const double dMaxFloat = 1e5; for (int i = 0; i < 2; i++) { for (int j = 0; j < 3; j++) { if (fabs(extents[i][j]) > dMaxFloat) return true; } } return false; } bool getTransformations(OdArray& arrMatr) { if (m_matTransform.isEqualTo(OdGeMatrix3d::kIdentity)) return false; const double dMaxFloat = 1e5; OdGeVector3d vTransl = m_matTransform.translation(); //If there is a loss in transformation precision, you will need to generate 2 matrices if (fabs(vTransl.x) > dMaxFloat || fabs(vTransl.y) > dMaxFloat || fabs(vTransl.z) > dMaxFloat) { OdGeVector3d vTransl1; OdGeVector3d vTransl2; for (unsigned int n = 0; n < 3; n++) { if (fabs(vTransl[n]) <= dMaxFloat) { vTransl1[n] = vTransl[n]; continue; } unsigned int nFloatDigits = 6; //We have to divide Double by 2 Floats for compatibility with OpenCollada parser double dTransl = vTransl[n]; int numDigits = static_cast(log10(fabs(dTransl))) + 1; double divisor = pow(10, numDigits - nFloatDigits); double diff = fmod(dTransl, divisor); dTransl -= diff; float high = static_cast(dTransl); float low = static_cast(dTransl - high + diff); vTransl1[n] = high; vTransl2[n] = low; } m_matTransform.setTranslation(vTransl2); arrMatr.push_back(OdGeMatrix3d::translation(vTransl1)); arrMatr.push_back(m_matTransform); return true; } arrMatr.push_back(m_matTransform); return true; } }; /** \details This structure stores the material data for exporting to a Collada file. */ struct ColladaMaterialData { /** Array of the material data. */ OdArray m_matDataArr; /** Array of the material data IDs. */ OdUInt64Array m_matIdArr; }; typedef OdArray ColladaEntDataArray; typedef OdArray EntityDataArray; /** \details This class implements the stub vectorize device for exporting to a Collada file. */ class StubVectorizeDevice : public OdGsBaseVectorizeDevice { protected: ODRX_USING_HEAP_OPERATORS(OdGsBaseVectorizeDevice); public: /** \details Creates a new instance of a StubVectorizeDevice object with the default parameters. */ StubVectorizeDevice() { } /** \details Destroys the instance of a StubVectorizeDevice. */ ~StubVectorizeDevice() override { } }; /** \details Fixes the color by ACI. \param ids [in] Input ODCOLORREF. \param color [in] Entity color. \returns Fixed OdCmEntityColor. */ static OdCmEntityColor fixByACI(const ODCOLORREF *ids, const OdCmEntityColor &color) { if (color.isByACI() || color.isByDgnIndex()) { return OdCmEntityColor(ODGETRED(ids[color.colorIndex()]), ODGETGREEN(ids[color.colorIndex()]), ODGETBLUE(ids[color.colorIndex()])); } else if (!color.isByColor()) { return OdCmEntityColor(0, 0, 0); } return color; } //Structure for storing object data when instantiating objects struct ColladaBlockEntData { ColladaBlockEntData() : m_orgId(0), m_entId(0), m_nMatIndex(0), m_nOrgMatId(0) {} ColladaBlockEntData(const ColladaEntData* entData, const OdCmEntityColor& color) : m_orgId(entData->getOriginalId()), m_entId(entData->m_iId), m_nMatIndex(entData->getMaterialIndex()), m_nOrgMatId(entData->getOriginalMatId()), m_color(color) {} OdUInt64 m_orgId; OdUInt64 m_entId; unsigned int m_nMatIndex; OdUInt64 m_nOrgMatId; OdCmEntityColor m_color; }; typedef std::map> BlockEntityDataArray; /** \details This class implements the Collada output. */ class OdColladaOut : public OdGsBaseMaterialView, public OdGiGeometrySimplifier { private: /** Index of the current material. */ unsigned int m_iCurMaterial; /** Original material ID. */ OdUInt64 m_orgMatId; public: /** Array of texture points. */ OdGePoint2dArray m_texCoordsArray; /** Pointer on the array of array entity data. */ EntityDataArray* m_pEntityDataArr; /** Pointer on the material data. */ ColladaMaterialData* m_pColladaMaterialData; /** Pointer on the light exporter. */ LightExporter* m_pLightExp; /** Pointer on the array of entity data. */ ColladaEntDataArray* m_pCurrentColladaEntDataArr; /** Pointer on the array of array entity data. */ ColladaEntData* m_pCurrentColladaEntData; /** Original drawable ID. */ OdUInt64 m_orgId; /** Counter of lights. */ unsigned int m_iLightCounter; /** Temporary index. */ unsigned int m_iTmpIndex; /** Flags for the raster material. */ OdUInt32 m_flags; /** Count of the points in the array. */ OdInt32 m_iPtArrSize; /** Matrix for 3D transformation. */ OdGeMatrix3d m_matTransform; /** Map for the deviations. */ const std::map* m_pMapDeviations; /** Flag that indicates whether to export wire entities (as lines). */ bool m_bExportWires; /** Flag to use entities instances without duplicating geometry. */ bool m_bUseInstances; /** Flag for inclusion in export of blocks from external references */ bool m_bIncludeXRefs; /** Deviation stack. */ OdArray m_arrDeviationStack; /** Current BlockReference matrix. */ OdGeMatrix3d m_blockMatr; /** Map of already passed objects. */ BlockEntityDataArray m_blockEntDataMap; unsigned int m_blockNestingCounter; /** Flag for the need to initialize the vertex data of the current ColladaEntData in m_pCurrentColladaEntData */ bool m_bNeedToInitVertData; /** \details Adds ColladaEntData to the array of entities with the current material. */ void addColladaEntData(); protected: void setMaiterial(unsigned int iCurMaterialIdx, OdUInt64 iOrgMatId) { m_iCurMaterial = iCurMaterialIdx; m_orgMatId = iOrgMatId; } OdGiMapperItemPtr setMapper(const OdGePoint3d& origin, const OdGeVector3d& u, const OdGeVector3d& v, const OdGiRasterImage* pImage); void triangleOut(const OdInt32* p3Vertices, const OdGeVector3d* pNormal) override; void fillCache(OdDbStub* materialIdStub, const MaterialData& matData, unsigned int iStartFind); void fillMaterialCacheId(MaterialData& mData, OdUInt64 matId, const OdGiMaterialTraitsData& materialData); OdGiMaterialItemPtr fillMaterialCache(OdGiMaterialItemPtr prevCache, OdDbStub* materialId, const OdGiMaterialTraitsData & materialData) ODRX_OVERRIDE; void polylineOut(OdInt32 numPoints, const OdGePoint3d* vertexList) ODRX_OVERRIDE; void circle(const OdGePoint3d& center, double radius, const OdGeVector3d& normal) ODRX_OVERRIDE; void circle(const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint, const OdGePoint3d& thirdPoint) ODRX_OVERRIDE; void circularArc(const OdGePoint3d& center, double radius, const OdGeVector3d& normal, const OdGeVector3d& startVector, double sweepAngle, OdGiArcType arcType) ODRX_OVERRIDE; void circularArc(const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint, const OdGePoint3d& thirdPoint, OdGiArcType arcType) ODRX_OVERRIDE; void polyline(OdInt32 numVertices, const OdGePoint3d* vertexList, const OdGeVector3d* pNormal, OdGsMarker baseSubEntMarker) ODRX_OVERRIDE; void polygon(OdInt32 numVertices, const OdGePoint3d* vertexList) ODRX_OVERRIDE; void pline(const OdGiPolyline& polyline, OdUInt32 fromIndex = 0, OdUInt32 numSegs = 0) ODRX_OVERRIDE; void shape(const OdGePoint3d& position, const OdGeVector3d& normal, const OdGeVector3d& direction, int shapeNumber, const OdGiTextStyle* pTextStyle); void text(const OdGePoint3d& position, const OdGeVector3d& normal, const OdGeVector3d& direction, double height, double width, double oblique, const OdString& msg) ODRX_OVERRIDE; void text(const OdGePoint3d& position, const OdGeVector3d& normal, const OdGeVector3d& direction, const OdChar* msg, OdInt32 length, bool raw, const OdGiTextStyle* pTextStyle) ODRX_OVERRIDE; void xline(const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint) ODRX_OVERRIDE; void ray(const OdGePoint3d& basePoint, const OdGePoint3d& throughPoint) ODRX_OVERRIDE; void nurbs(const OdGeNurbCurve3d& nurbsCurve) ODRX_OVERRIDE; void ellipArc(const OdGeEllipArc3d& ellipArc, const OdGePoint3d* endPointsOverrides, OdGiArcType arcType) ODRX_OVERRIDE; void mesh(OdInt32 numRows, OdInt32 numColumns, const OdGePoint3d* vertexList, const OdGiEdgeData* pEdgeData, const OdGiFaceData* pFaceData, const OdGiVertexData* pVertexData) ODRX_OVERRIDE; void meshProc(OdInt32 numRows, OdInt32 numColumns, const OdGePoint3d* vertexList, const OdGiEdgeData* pEdgeData = 0, const OdGiFaceData* pFaceData = 0, const OdGiVertexData* pVertexData = 0) ODRX_OVERRIDE; void worldLine(const OdGePoint3d points[2]) ODRX_OVERRIDE; void edge(const OdGiEdge2dArray& edges) ODRX_OVERRIDE; void shell(OdInt32 numVerts, const OdGePoint3d* pVertexList, OdInt32 faceListSize, const OdInt32* pFaceList, const OdGiEdgeData* pEdgeData, const OdGiFaceData* pFaceData, const OdGiVertexData* pVertexData) ODRX_OVERRIDE; void shellProc(OdInt32 numVertices, const OdGePoint3d* vertexList, OdInt32 faceListSize, const OdInt32* faceList, const OdGiEdgeData* pEdgeData, const OdGiFaceData* pFaceData, const OdGiVertexData* pVertexData) ODRX_OVERRIDE; void shellFaceOut(OdInt32 faceListSize, const OdInt32* pFaceList, const OdGeVector3d* pNormal) ODRX_OVERRIDE; void meshFaceOut(const OdInt32* faceList, const OdGeVector3d* pNormal) ODRX_OVERRIDE; void rasterImageDc(const OdGePoint3d& origin, const OdGeVector3d& u, const OdGeVector3d& v, const OdGiRasterImage* pImage, const OdGePoint2d* uvBoundary, OdUInt32 numBoundPts, bool transparency = false, double brightness = 50.0, double contrast = 50.0, double fade = 0.0) ODRX_OVERRIDE; void image(const OdGiImageBGRA32& img, const OdGePoint3d& origin, const OdGeVector3d& uVec, const OdGeVector3d& vVec, OdGiRasterImage::TransparencyMode trpMode = OdGiRasterImage::kTransparency8Bit) ODRX_OVERRIDE; void processMaterialNode(OdDbStub *materialId, OdGsMaterialNode *pNode) ODRX_OVERRIDE; void initTexture(const OdGePoint3d& origin, const OdGeVector3d& u, const OdGeVector3d& v, const OdGiRasterImage* pImage, bool transparency, double brightness, double contrast, double fade) ODRX_OVERRIDE; void uninitTexture() ODRX_OVERRIDE; void addColladaEntity(); bool tryToGetInstance(const OdGiDrawable* pDrawable, bool& bHasBlockMatr, OdGeMatrix3d& blockMatr); //Add Entity data to m_blockEntDataMap void addColladaEntDataInstance(const ColladaBlockEntData* pBlockEntData, const OdGiSubEntityTraitsData& entTraits); //Get entity data from m_blockEntDataMap const ColladaBlockEntData* getColladaBlockEntDataById(OdUInt64 orgId, const OdDbStub* lineTypeId) const; //Adding a new instance of an object void addColladaBlockEntData(OdUInt64 orgId, const ColladaEntData* pEntData, const OdDbStub* lineTypeId, const OdCmEntityColor& entColor); //Initialize current ColladaEntData in m_pCurrentColladaEntData; void initCurEntVertexData(); public: /** \details Creates a new instance of an OdColladaOut object with the default parameters. */ OdColladaOut(); /** \details Returns a pointer to the device. \returns StubVectorizeDevice if the pointer is not NULL, or a non-NULL pointer otherwise. */ StubVectorizeDevice* device(); /** \details Draws the specified drawable. \param drawableFlags [in] Drawable flags. \param pDrawable [in] Pointer to the drawable to draw. \returns The true value if drawable is successfully drawn, or false otherwise. */ bool doDraw(OdUInt32 i, const OdGiDrawable* pDrawable) ODRX_OVERRIDE; /** \details Initializes OdColladaOut class by input parameters. \param pEntityDataArr [in] Pointer on array of array entity data. \param pColladaMaterialData [in] Pointer to the material data. \param pLightExp [in] Pointer to the light exporter. \param matTransform [in] Matrix for 3D transformation. \param pMapDeviations [in] Map for the deviations. \param exportWires [in] Flag that indicates whether to export wire entities (as lines). */ void init(EntityDataArray* pEntityDataArr, ColladaMaterialData* pColladaMaterialData, LightExporter* pLightExp, const OdGeMatrix3d& matTransform, const std::map* pMapDeviations = NULL, bool exportWires = false, bool bUseInstances = false, bool bIncludeXRefs = true); /** \details Begins view vectorization. */ void beginViewVectorization() ODRX_OVERRIDE; /** \details Ends view vectorization. */ void endViewVectorization() ODRX_OVERRIDE; /** \details Updates the viewport: loads viewport traits, updates extents (if necessary), displays associated drawables, and draws the viewport frame. */ void updateViewport() ODRX_OVERRIDE; /** \details Returns the recommended maximum deviation of the current vectorization for the specified point on the curve or surface being tesselated. \param deviationType [in] Deviation type. \param pointOnCurve [in] Point on the curve. \returns Recommended maximum deviation of the current vectorization as a double value. \remarks deviationType must be one of the following: Name Value kOdGiMaxDevForCircle 0 kOdGiMaxDevForCurve 1 kOdGiMaxDevForBoundary 2 kOdGiMaxDevForIsoline 3 kOdGiMaxDevForFacet 4
*/ double deviation(const OdGiDeviationType deviationType, const OdGePoint3d& pointOnCurve) const ODRX_OVERRIDE; /** \details Sets render mode for the view. \param mode [in] Render mode. */ void setMode(OdGsView::RenderMode mode) ODRX_OVERRIDE; /** \details Get handle for OdGiDrawable. \param pDrawable [in] OdGiDrawable. */ OdUInt64 getHandle(const OdGiDrawable* pDrawable) const; /** \details Get handle for OdDbStub. \param pIdStub [in] OdDbStub. */ OdUInt64 getHandle(OdDbStub* pIdStub) const; }; } #endif //_COLLADA_EXPORT_VIEW_INCLUDED_