/////////////////////////////////////////////////////////////////////////////// // 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 _ODTV_MODELID_H_INCLUDED_ #define _ODTV_MODELID_H_INCLUDED_ #include "Tv.h" #include "TvIObject.h" class OdTvModel; class OdTvModelReference; /** \details The base interface class for a Visualize SDK model identifier. The model identifier interface provides access to the model object. */ class ODTV_EXPORT OdTvModelId : public OdTvId { public: /** \details Enumerates model kinds. */ enum ModelKind { kUndefined = 0, // An undefined type kModel = 1, // An model type. kModelReference = 2 // An model reference type. }; /** \details Returns the type of an model. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns The current type of the model represented as a value of the enumeration. \remarks If the rc parameter is not null and the model type has been successfully opened, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ ModelKind getModelKind( OdTvResult* rc = NULL ) const; /** \details Opens the model for reading and writing. \param mode [in] An access mode (read, write, or read-write). \param rc [out] A pointer to a value of the type that contains the result of the operation. \returns A smart pointer to the model object. \remarks If the rc parameter is not null and the model is successfully opened, the rc parameter accepts the tvOk value, otherwise it contains an appropriate error code. Model reference also can be opened using this method. */ OdTvSmartPtr< OdTvModel > openObject(OdTv::OpenMode mode = OdTv::kForRead, OdTvResult* rc = NULL) const; /** \details Opens the model reference for reading and writing. \param mode [in] An access mode (read, write, or read-write). \param rc [out] A pointer to a value of the type that contains the result of the operation. \returns A smart pointer to the model object. \remarks If the rc parameter is not null and the model reference is successfully opened, the rc parameter accepts the tvOk value, otherwise it contains an appropriate error code. */ OdTvSmartPtr< OdTvModelReference > openObjectAsModelReference( OdTv::OpenMode mode = OdTv::kForRead, OdTvResult* rc = NULL ) const; /** \details Retrieves the WCS extents of this model (including model transformations). \param rc [out] A pointer to a value of the type that contains the result of the operation. \returns The WCS extents of the model. \remarks If the rc parameter is not null and the flag value has been successfully returned, the rc parameter accepts tvOk value; otherwise it contains an appropriate error code. */ OdTvExtents3d getWCSExtents(OdTvResult* rc = NULL) const; }; #endif //_ODTV_MODELID_H_INCLUDED_