/////////////////////////////////////////////////////////////////////////////// // 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 __TNW_COMPONENT_H__ #define __TNW_COMPONENT_H__ #include "NwObject.h" #include "NwExport.h" #include "NwTriangleIndexes.h" #include "Ge/GePoint3dArray.h" #include "Ge/GeVector3dArray.h" #include "UInt32Array.h" class OdNwColor; class OdGiRasterImage; class OdGeMatrix3d; class OdNwTextureSpace; /** \details This template class is a specialization of the OdSmartPtr class for OdGiRasterImage object pointers. */ typedef OdSmartPtr OdGiRasterImagePtr; /** \details This template class is a specialization of the OdSmartPtr class for OdNwTextureSpace object pointers. */ typedef OdSmartPtr OdNwTextureSpacePtr; /** \details Structure containing required shell geometry data for the OdNwComponent::addShell() method. \remarks This structure holds references to geometry data arrays (vertices, normals, and face indices). The arrays must remain valid for the lifetime of this structure, as the structure does not copy the data. */ struct OdNwRequiredShellData { /** \details Constructor for required shell data. \param vertices [in] Array of 3D vertex points. \param normals [in] Array of normal vectors. \param faces [in] Array of triangle face indices. */ OdNwRequiredShellData(const OdGePoint3dArray& vertices, const OdGeVector3dArray& normals, const OdArray& faces) : m_aVertices(vertices) , m_aNormals(normals) , m_aFaces(faces) { } ~OdNwRequiredShellData() = default; OdNwRequiredShellData(const OdNwRequiredShellData&) = delete; OdNwRequiredShellData& operator=(const OdNwRequiredShellData&) = delete; OdNwRequiredShellData(OdNwRequiredShellData&&) = delete; OdNwRequiredShellData& operator=(OdNwRequiredShellData&&) = delete; /** \details Gets the array of vertex points. \returns Reference to the array of 3D vertex points. */ const OdGePoint3dArray& getVertices() const { return m_aVertices; } /** \details Gets the array of normal vectors. \returns Reference to the array of normal vectors. */ const OdGeVector3dArray& getNormals() const { return m_aNormals; } /** \details Gets the array of triangle face indices. \returns Reference to the array of triangle face indices. */ const OdArray& getFaces() const { return m_aFaces; } private: const OdGePoint3dArray& m_aVertices; const OdGeVector3dArray& m_aNormals; const OdArray& m_aFaces; }; /** \details Structure containing optional shell geometry data for the OdNwComponent::addShell() method. \remarks All members have default values. This structure can be default-constructed or initialized with specific values using designated initializers. */ struct OdNwAdditionalShellData { const OdUInt32Array* m_pColorArray = nullptr; ///< Pointer to array of vertex colors. If nullptr, no vertex colors are applied. const OdGePoint2dArray* m_pUVArray = nullptr; ///< Pointer to array of UV texture coordinates. If nullptr, no UV coordinates are applied. bool m_isSolid = false; ///< Flag indicating whether the shell represents a solid figure. double m_recenterThreshold = 0.0; ///< Threshold value for geometry recentering optimization (not implemented yet). double m_priorityScale = 1.0; ///< Priority scale factor for rendering traversal. Default is 1.0. }; /** \details This class represents a geometry component within the model hierarchy. */ class NWDBEXPORT OdNwComponent : public OdNwObject { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwComponent); //DOM-IGNORE-END public: /** \details Default constructor. Creates a new OdNwComponent object. */ OdNwComponent(); /** \details Constructor for objects of the OdNwComponent class. Creates an OdNwComponent object for the specified component. \param pImpl [in] Component to create an OdNwComponent object for. */ explicit OdNwComponent(OdNwObjectImpl* pImpl); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwComponent(); /** \details Gets an array with fragments of this geometry component. \param aFragments [out] OdArray with object IDs of fragments of the geometry component. \returns The eOk value if successful, or an appropriate error code otherwise. */ OdResult getFragments(OdNwObjectIdArray& aFragments) const; /** \details Indicates whether the component is hidden within the model hierarchy. \returns The true value if the component is hidden, or false otherwise. */ bool isHidden() const; /** \details Indicates whether the component has vertex color override, or vertex color not in rendering. \returns The true value if the component has vertex color override, or false otherwise. */ bool hasVertexColorOverride() const; /** \details Gets bitfields with the primitives used to define this geometry component. \returns OdUInt8 value for bitfields with geometry primitives. \remarks The bitfields must contain the following bits: Name Value Description NwPrimitiveTypes::NONE 0x00 No primitives. NwPrimitiveTypes::TRIANGLES 0x01 Has triangle primitives. NwPrimitiveTypes::LINES 0x02 Has line primitives. NwPrimitiveTypes::POINTS 0x04 Has point primitives. NwPrimitiveTypes::SNAPPOINTS 0x08 Has snap point primitives. NwPrimitiveTypes::TEXT 0x10 Has text primitives. NwPrimitiveTypes::SOLID 0x20 Has solid primitives.
*/ OdUInt8 getPrimitives() const; /** \details Receives the object ID of the material of this component. \returns Object ID of the OdNwMaterial object with the material of this component. If the component does not have a material, the returned object ID is empty. \remarks Method will be thread safe in following cases: 1. A database was opened in multithread loading mode. In this case MT-loading mode must be set by the OdNwHostAppServices::setMtMode () method before user starts database reading. 2. A database was visualized in multithread rendering mode. Note: MT-rendering mode must be set with "EnableMultithread" GsDevice property before the rendering starts. */ OdNwObjectId getMaterialId() const; /** \details Receives the object ID of the original material of this component, without override processing. \returns Object ID of the OdNwMaterial object with the original material of this component. If the component does not have a material, the returned object ID is empty. \remarks Method will be thread safe in following cases: 1. A database was opened in multithread loading mode. In this case MT-loading mode must be set by the OdNwHostAppServices::setMtMode () method before user starts database reading. 2. A database was visualized in multithread rendering mode. Note: MT-rendering mode must be set with "EnableMultithread" GsDevice property before the rendering starts. */ OdNwObjectId getOriginalMaterialId() const; /** \details Gets the adjusting material mapping of the geometry component. \returns The smart pointer with OdNwTextureSpace base class object, with material mapping type for geometry texture. \remarks If the model does not specify material mapping for a component's model item, the method returns the default OdNwTextureSpaceExplicit object if geometry has UV-coords or returns the default OdNwTextureSpaceBox object. */ OdNwTextureSpacePtr getMaterialMapping() const; /** \details Gets the current (visible) transparency for this geometry component. \param val [out] Transparency value. \returns The eOk value if the operation is successful, or an appropriate error code otherwise. \remarks The method is deprecated since version 25.9 and will be removed soon. Instead, use the getMaterialId/getOriginalMaterialId methods for getting transparency from OdNwMaterial. */ OdResult getTransparency(float& val) const; /** \details Gets the low bound of this geometry component in world space. \param lb [out] OdGePoint3d object with the low bound of this geometry component. \returns The eOk value if the operation is successful, or an appropriate error code otherwise. \remarks The method is deprecated since version 25.9 and will be removed soon. Instead, use the method OdNwModelItem::getBoundingBox() const from the parent model item. */ OdResult getLowBound(OdGePoint3d& lb) const; /** \details Gets the high bound of this geometry component in world space. \param hb [out] OdGePoint3d object with the high bound of this geometry component. \returns The eOk value if the operation is successful, or an appropriate error code otherwise. \remarks The method is deprecated since version 25.9 and will be removed soon. Instead, use the method OdNwModelItem::getBoundingBox() const from the parent model item. */ OdResult getHighBound(OdGePoint3d& hb) const; /** \details Receives the number of fragments this geometry is divided into. \returns Number of fragments. */ OdUInt32 getFragmentCount() const; /** \details Receives the object ID of the fragment with the geometry of this component. \param index [in] Value of the fragment's index in the component's fragment array. \returns Object ID of the OdNwFragment object with the fragment (by index) with the geometry of this component. If there is no fragment with this index, the returned object ID is empty. */ OdNwObjectId findFragmentGeometry(OdUInt32 index) const; /** \details Adds a fragment with the specified geometry to this component. \param geometryId [in] OdNwObjectId of the OdNwGeometry object with given geometry. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. \remarks The method is deprecated since version 25.10 and will be removed soon. Use the method addGeometry instead. */ OdNwObjectId addFragmentGeometry(const OdNwObjectId& geometryId, OdResult* pResult = NULL); /** \details Adds a fragment with the specified geometry to this component. \param geometryId [in] OdNwObjectId of the OdNwGeometry object with given geometry. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. */ OdNwObjectId addGeometry(const OdNwObjectId& geometryId, OdResult* pResult = NULL); /** \details Adds a fragment with the specified circle geometry to this component. \param center [in] Center of the circle. \param radius [in] Radius of the circle. \param normal [in] Normal of the circle. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. \remarks The method is deprecated since version 25.2 and will be removed soon. Use the method addCircle instead. */ OdNwObjectId addFragmentGeometryCircle(const OdGePoint3d& center, double radius, const OdGeVector3d& normal, OdResult* pResult = NULL); /** \details Adds a fragment with the specified circle geometry to this component. \param center [in] Center of the circle. \param radius [in] Radius of the circle. \param normal [in] Normal of the circle. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. */ OdNwObjectId addCircle(const OdGePoint3d& center, double radius, const OdGeVector3d& normal, OdResult* pResult = NULL); /** \details Adds a fragment with the specified polyline geometry to this component. \param points [in] Array of 3D points. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. \remarks The method is deprecated since version 25.2 and will be removed soon. Use the method addPolyline instead. */ OdNwObjectId addFragmentGeometryPolyline(const OdGePoint3dArray& points, OdResult* pResult = NULL); /** \details Adds a fragment with the specified polyline geometry to this component. \param points [in] Array of 3D points. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. */ OdNwObjectId addPolyline(const OdGePoint3dArray& points, OdResult* pResult = NULL); /** \details Adds a fragment with the specified shell geometry to this component. \param pVertexList [in] Array with 3D points. \param pNormalList [in] Array with normals. \param pFaceList [in] Array of vertex indices for each triangle. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. \remarks Arrays of vertices and normals must have the same size. Also normals must not be empty. The method is deprecated since version 25.0 and will be removed soon. Use the method addShell instead. */ OdNwObjectId addFragmentGeometryShell(const OdGePoint3dArray& pVertexList, const OdGeVector3dArray& pNormalList, const OdArray& pFaceList, OdResult* pResult = NULL); /** \details Adds a fragment with the specified shell geometry to this component (with vertex colors). \param pVertexList [in] Array with 3D points. \param pNormalList [in] Array with normals. \param pColorList [in] Array with colors. \param pFaceList [in] Array of vertex indices for each triangle. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. \remarks Arrays of vertices and normals must have the same size. The method is deprecated since version 25.0 and will be removed soon. Use the addShell method instead. */ OdNwObjectId addFragmentGeometryShell(const OdGePoint3dArray& pVertexList, const OdGeVector3dArray& pNormalList, const OdUInt32Array& pColorArray, const OdArray& pFaceList, OdResult* pResult = NULL); /** \details Adds a fragment with the specified shell geometry to this component with vertex colors and a flag defining whether it is a solid figure. \param aVertexList [in] Array with 3D points. \param aNormalList [in] Array with normals. \param aFaceList [in] Array of vertex indices for each triangle. \param isSolid [in] Flag defining if figure is solid. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. \remarks Arrays of vertices and normals must have the same size. The method is deprecated since version 25.11 and will be removed soon. Use the addShell method with OdNwRequiredShellData and OdNwAdditionalShellData structures instead. */ OdNwObjectId addShell(const OdGePoint3dArray& aVertexList, const OdGeVector3dArray& aNormalList, const OdArray& aFaceList, bool isSolid = false, OdResult* pResult = NULL); /** \details Adds a fragment with the specified shell geometry to this component with vertex colors and a flag defining whether it is a solid figure. \param aVertexList [in] Array with 3D points. \param aNormalList [in] Array with normals. \param aColorList [in] Array with colors. \param aFaceList [in] Array of vertex indices for each triangle. \param isSolid [in] Flag defining if figure is solid. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. \remarks Arrays of vertices, normals and colors must have the same size. The method is deprecated since version 25.11 and will be removed soon. Use the addShell method with OdNwRequiredShellData and OdNwAdditionalShellData structures instead. */ OdNwObjectId addShell(const OdGePoint3dArray& aVertexList, const OdGeVector3dArray& aNormalList, const OdUInt32Array& aColorArray, const OdArray& aFaceList, bool isSolid = false, OdResult* pResult = NULL); /** \details Adds a fragment with the specified shell geometry to this component. \param shellData [in] Structure containing required shell geometry data (vertices, normals, faces). \param helpShellData [in] Structure containing optional shell properties (colors, UV coords, solid flag, priority scale). Default is empty structure with default values. \param pResult [out] Pointer to the OdResult object with the error code. \returns Object ID of the new OdNwFragment object. \remarks This method provides a more flexible interface for shell creation with optional parameters. Arrays of vertices and normals must have the same size. Normals must not be empty. If helpShellData.m_pColorArray is provided, the color array must have the same size as vertices. If helpShellData.m_pUVArray is provided, the UV coordinate array must have the same size as vertices. */ OdNwObjectId addShell(const OdNwRequiredShellData& shellData, const OdNwAdditionalShellData& helpShellData = {}, OdResult * pResult = NULL); /** \details Adds a fragment with the specified snap point geometry to this component. \param point [in] Snap point 3D point. \param pResult [out] Pointer to the OdResult object with an error code. \returns Object ID of the new OdNwFragment object. \remarks The method is deprecated since version 25.2 and will be removed soon. Use the method addSnapPoint instead. */ OdNwObjectId addFragmentGeometrySnapPoint(const OdGePoint3d& point, OdResult* pResult = NULL); /** \details Adds a fragment with the specified snap point geometry to this component. \param point [in] Snap point 3D point. \param pResult [out] Pointer to the OdResult object with an error code. \returns Object ID of the new OdNwFragment object. */ OdNwObjectId addSnapPoint(const OdGePoint3d& point, OdResult* pResult = NULL); /** \details Adds a fragment with the specified point set geometry to this component. \param point [in] Array with 3D points. \param point [in] Array with colors. \param pResult [out] Pointer to the OdResult object with an error code. \returns Object ID of the new OdNwFragment object. \remarks The method is deprecated since version 25.2 and will be removed soon. Use the method addPointSet instead. */ OdNwObjectId addFragmentGeometryPointSet(const OdGePoint3dArray& point, const OdUInt32Array& pColorArray, OdResult* pResult = NULL); /** \details Adds a fragment with the specified point set geometry to this component. \param point [in] Array with 3D points. \param point [in] Array with colors. \param pResult [out] Pointer to the OdResult object with an error code. \returns Object ID of the new OdNwFragment object. */ OdNwObjectId addPointSet(const OdGePoint3dArray& point, const OdUInt32Array& pColorArray, OdResult* pResult = NULL); /** \details Adds a fragment with the specified cylinder geometry to this component. \param normal [in] 3D vector of direction of cylinder \param radius [in] Radius of cylinder \param topCenter [in] 3D point of one of two boundary points of cylinder \param botomCenter [in] 3D point of one of two boundary points of cylinder \param pResult [out] Pointer to the OdResult object with an error code. \returns Object ID of the new OdNwFragment object. \remarks The method is deprecated since version 25.2 and will be removed soon. Use the method addCylinder instead. */ OdNwObjectId addFragmentGeometryCylinder(const OdGeVector3d& normal, double radius, const OdGePoint3d& topCenter, const OdGePoint3d& botomCenter, OdResult* pResult = NULL); /** \details Adds a fragment with the specified cylinder geometry to this component. \param normal [in] 3D vector of direction of cylinder \param radius [in] Radius of cylinder \param topCenter [in] 3D point of one of two boundary points of cylinder \param botomCenter [in] 3D point of one of two boundary points of cylinder \param pResult [out] Pointer to the OdResult object with an error code. \returns Object ID of the new OdNwFragment object. */ OdNwObjectId addCylinder(const OdGeVector3d& normal, double radius, const OdGePoint3d& topCenter, const OdGePoint3d& botomCenter, OdResult* pResult = NULL); /** \details Adds a fragment with the specified text. \param text [in] Text value. \param leftPoint [in] Left bottom point. \param rightPoint [in] 3D right top point. \param normal [in] Normal of text. \param rotation [in] Rotation angle. \param scale [in] Scale factor. \param textStyleId [in] Text style OdNwTextStyle object. \param pResult [out] Pointer to the OdResult object with an error code. \returns Object ID of the new OdNwFragment object. \remarks If textStyleId is null, a default text style is created with font name Arial and font height 1. The method is deprecated since version 25.2 and will be removed soon. Use the addText method instead. */ OdNwObjectId addFragmentGeometryText(const OdString& text, const OdGePoint3d& leftPoint, const OdGePoint3d& rightPoint, const OdGeVector3d& normal, float rotation, float scale, const OdNwObjectId& textStyleId = OdNwObjectId::kNull, OdResult* pResult = NULL); /** \details Adds a fragment with the specified text. \param text [in] Text value. \param leftPoint [in] Left bottom point. \param rightPoint [in] 3D right top point. \param normal [in] Normal of text. \param rotation [in] Rotation angle. \param scale [in] Scale factor. \param textStyleId [in] Text style OdNwTextStyle object. \param pResult [out] Pointer to the OdResult object with an error code. \returns Object ID of the new OdNwFragment object. \remarks If textStyleId is null, a deafult text style is created with font name Arial and font height 1. */ OdNwObjectId addText(const OdString& text, const OdGePoint3d& leftPoint, const OdGePoint3d& rightPoint, const OdGeVector3d& normal, float rotation, float scale, const OdNwObjectId& textStyleId = OdNwObjectId::kNull, OdResult* pResult = NULL); /** \details Adds a new RCS external geometry. \param voxelIdx [in] Index of voxel. \param reference [in] Reference to RCS file, full path. \param strGuid [in] GUID from RCS taken from RCS point cloud engine. \param extents [in] Extents of voxel. \param pointSize [in] Amount of points in voxel. \param pResult [out] Pointer to the OdResult object with an error code. \returns Object ID of the new OdNwFragment object. \remarks The method is deprecated since version 25.2 and will be removed soon. Use the addRcs method instead. */ OdNwObjectId addFragmentExteranlGeomentryRcs(OdUInt64 voxelIdx, const OdString& reference, const OdString& strGuid, const OdGeExtents3d& extents, OdUInt32 pointSize, OdResult* pResult); /** \details Adds a new RCS external geometry. \param voxelIdx [in] Index of voxel. \param reference [in] Reference to RCS file, full path. \param strGuid [in] GUID from RCS taken from RCS point cloud engine. \param extents [in] Extents of voxel. \param pointSize [in] Amount of points in voxel. \param pResult [out] Pointer to the OdResult object with an error code. \returns Object ID of the new OdNwFragment object. */ OdNwObjectId addRcs(OdUInt64 voxelIdx, const OdString& reference, const OdString& strGuid, const OdGeExtents3d& extents, OdUInt32 pointSize, OdResult* pResult = NULL); /** \details Sets the material for the component. \param matId [in] Constant reference to the OdNwObjectId object with OdNwMaterial's derrived object. \returns The eOk value if the material is set to the component successfully, or an appropriate error code otherwise. \remarks The method is deprecated. Use the method OdNwModelItem::addMaterial(OdNwMaterialAttributePtr pMaterial) for setting material to model's node. */ OdResult setMaterial(const OdNwObjectId& matId); /** \details Sets the ambient color of the component's material. \param clr [in] OdNwColor object with the color value. \returns The eOk value if the color is set to the material successfully, or an appropriate error code otherwise. \remarks The method is deprecated. Use the method OdNwMaterialAttribute::setAmbient for setting material color. */ OdResult setAmbient(const OdNwColor& clr); /** \details Sets the diffuse color of the component's material. \param clr [in] OdNwColor object with the color value. \returns The eOk value if the color is set to the material successfully, or an appropriate error code otherwise. \remarks The method is deprecated. Use the method OdNwMaterialAttribute::setDiffuse for setting material color. */ OdResult setDiffuse(const OdNwColor& clr); /** \details Sets the specular color of the component's material. \param clr [in] OdNwColor object with the color value. \returns The eOk value if the color is set to the material successfully, or an appropriate error code otherwise. \remarks The method is deprecated. Use the method OdNwMaterialAttribute::setSpecular for setting material color. */ OdResult setSpecular(const OdNwColor& clr); /** \details Sets the emissive color of the component's material. \param clr [in] OdNwColor object with the color value. \returns The eOk value if the color is set to the material successfully, or an appropriate error code otherwise. \remarks The method is deprecated. Use the method OdNwMaterialAttribute::setEmissive for setting material color. */ OdResult setEmissive(const OdNwColor& clr); /** \details Sets the shininess value of the component's material. \param val [in] Shininess value. \returns The eOk value if the shininess is set to the material successfully, or an appropriate error code otherwise. \remarks The method is deprecated. Use the method OdNwMaterialAttribute::setShininess for setting material coefficient. */ OdResult setShininess(float val); /** \details Sets the transparency value of the component's material. \param val [in] Transparency value. \returns The eOk value if the transparency is set to the material successfully, or an appropriate error code otherwise. \remarks The method is deprecated. Use the method OdNwMaterialAttribute::setTransparency for setting material coefficient. */ OdResult setTransparency(float val); /** \details Sets the internal texture data of the component's material. \param txtPath [in] A string value with the texture path. \param pTxtImage [in] A smart pointer to the OdGiRasterImage object with the texture. \param pMappingTransform [in] A pointer to an OdGeMatrix3d object with the texture mapping transformation. \returns The eOk value if the texture data is set to the material successfully, or an appropriate error code otherwise. \remarks The texture mapping transformation can contain: x scale value in the [0][0] element, y scale value in the [1][1] element, x offset value in the [0][3] element, y offset value in the [1][3] element. If the getMaterialId() method is called and returns an object ID with an OdNwTexture object and then the setInternalTexture() method is called, the returned object ID becomes invalid and the getMaterialId() method must be called again for correct behavior. The method is deprecated. Use the method OdNwModelItem::addGraphicMaterial(OdNwGraphicMaterialAttributePtr pGraphMaterial) with method NwMaterialUtils::getDefaultGenericSchemaBundleByInternalTexture for setting texture to model's node. */ OdResult setInternalTexture(const OdString& txtPath, OdGiRasterImagePtr pTxtImage, const OdGeMatrix3d* pMappingTransform = NULL); /** \details Sets the external texture data of the component's material. \param txtPath [in] A string value with the texture path. \param pMappingTransform [in] A pointer to the OdGeMatrix3d object with the texture mapping transformation. \returns The eOk value if the texture data is set to the material successfully, or an appropriate error code otherwise. \remarks The texture mapping transformation can contain: x scale value in the [0][0] element, y scale value in the [1][1] element, x offset value in the [0][3] element, y offset value in the [1][3] element. If the getMaterialId() method is called and returns an object ID with an OdNwTexture object and after the setExternalTexture() method is called, the returned object ID becomes invalid and the getMaterialId() method must be called again for correct behavior. The method is deprecated. Use the method OdNwModelItem::addGraphicMaterial(OdNwGraphicMaterialAttributePtr pGraphMaterial) with method NwMaterialUtils::getDefaultGenericSchemaBundleByExternalTexture for setting texture to model's node. */ OdResult setExternalTexture(const OdString& txtPath, const OdGeMatrix3d* pMappingTransform = NULL); }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwComponent object pointers. */ typedef OdSmartPtr OdNwComponentPtr; #endif //__TNW_COMPONENT_H__