FDO API Reference | Feature Data Objects |
00001 #ifndef _ILINEARRING_H_ 00002 #define _ILINEARRING_H_ 00003 00004 // 00005 // Copyright (C) 2004-2006 Autodesk, Inc. 00006 // 00007 // This library is free software; you can redistribute it and/or 00008 // modify it under the terms of version 2.1 of the GNU Lesser 00009 // General Public License as published by the Free Software Foundation. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 // 00020 00021 00022 00023 #ifdef _WIN32 00024 #pragma once 00025 #endif 00026 00027 00028 #include <Geometry/IRingAbstract.h> 00029 #include <Geometry/IDirectPosition.h> 00030 #include <Common/Collection.h> 00031 00032 /// \brief 00033 /// The FdoILinearRing class is a linear ring helper type. 00034 /// The shape of FdoILinearRing is the set of positions defined by the contained collection, 00035 /// plus linear interpolation between consecutive points. 00036 class FdoILinearRing : public FdoIRingAbstract 00037 { 00038 public: 00039 00040 /// \brief 00041 /// Gets the number of positions in this object. 00042 /// 00043 /// \return 00044 /// Returns the number of positions 00045 /// 00046 FDO_GEOM_API virtual FdoInt32 GetCount() const = 0; 00047 00048 /// \brief 00049 /// Gets the position at the specified (zero-based) index. 00050 /// 00051 /// \param index 00052 /// Input Zero-based index in the object's list of positions. 00053 /// 00054 /// \return 00055 /// Returns the position 00056 /// 00057 FDO_GEOM_API virtual FdoIDirectPosition* GetItem( 00058 FdoInt32 index) const = 0; 00059 00060 /// \brief 00061 /// Gets the position at the specified (zero-based) index, by values of its member data. 00062 /// This is in aid of higher performance for any implementation that 00063 /// does not internally use FdoIDirectPosition objects for storage, or for 00064 /// an application seeking to avoid overhead of accessor methods. 00065 /// 00066 /// \param index 00067 /// Input Zero-based index in the object's list of positions. 00068 /// \param x 00069 /// Output X ordinate value. 00070 /// \param y 00071 /// Output Y ordinate value. 00072 /// \param z 00073 /// Output Z ordinate value. 00074 /// \param m 00075 /// Output M ordinate value. 00076 /// \param dimensionality 00077 /// Output Dimensionality of ordinates in this position. 00078 /// 00079 /// \return 00080 /// Returns nothing 00081 /// 00082 FDO_GEOM_API virtual void GetItemByMembers( 00083 FdoInt32 index, 00084 double *x, 00085 double *y, 00086 double *z, 00087 double *m, 00088 FdoInt32 *dimensionality) const = 0; 00089 00090 /// \brief 00091 /// Gets a collection of all of the positions in this object. 00092 /// 00093 /// \return 00094 /// Returns the positions 00095 /// 00096 FDO_GEOM_API virtual FdoDirectPositionCollection* GetPositions() = 0; 00097 00098 /// \brief 00099 /// Gets the ordinates as an array. 00100 /// 00101 /// \remarks 00102 /// The caller must not free the returned array. 00103 /// The ordinates are in the order XYZMXYZM..., with only those present 00104 /// according to the dimensionality. 00105 /// 00106 /// \return 00107 /// Returns the ordinates 00108 /// 00109 FDO_GEOM_API virtual const double * GetOrdinates() = 0; 00110 00111 protected: 00112 00113 /// \brief 00114 /// Constructs a default instance. 00115 /// 00116 /// \return 00117 /// Returns nothing 00118 /// 00119 FDO_GEOM_API FdoILinearRing() {}; 00120 00121 /// \brief 00122 /// Default destructor. 00123 /// 00124 /// \return 00125 /// Returns nothing 00126 /// 00127 FDO_GEOM_API virtual ~FdoILinearRing() {}; 00128 }; 00129 00130 /// \brief 00131 /// The FdoLinearRingCollection class is a collection of CurvePolygon objects. 00132 class FdoLinearRingCollection : public FdoCollection<FdoILinearRing, FdoException> 00133 { 00134 public: 00135 /// \brief 00136 /// Creates an instance of FdoLinearRingCollection with no contained elements. 00137 /// 00138 /// \return 00139 /// Returns an empty collection 00140 /// 00141 static FdoLinearRingCollection* Create() 00142 { 00143 FdoLinearRingCollection* value = new FdoLinearRingCollection(); 00144 if (NULL == value) 00145 throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_1_BADALLOC))); 00146 00147 return value; 00148 } 00149 00150 protected: 00151 void Dispose() 00152 { 00153 delete this; 00154 } 00155 }; 00156 #endif 00157 00158
Comments or suggestions? Send us feedback. |