FDO API Reference Feature Data Objects

IEnvelope.h

Go to the documentation of this file.
00001 #ifndef _IENVELOPE_H_
00002 #define _IENVELOPE_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 #include <FdoCommon.h>
00028 
00029 /// \brief
00030 /// The FdoIEnvelope class is a three-dimensional, axis-aligned box.  This is a
00031 /// helper type for Geometries, and does not itself inherit from
00032 /// IGeometry.
00033 /// This type is typically used to record the "extents" of a shape, also
00034 /// known in 2 dimensions as an MBR ("Minimum Bounding Rectangle").
00035 /// The box may be initially empty, meaning that no dimensions have an
00036 /// assigned value.
00037 /// each individual extent may be unassigned, in which case using its
00038 /// accessor will return numeric_limits<double>::quiet_NaN().
00039 class FdoIEnvelope : public FdoIDisposable
00040 {
00041 public:
00042 
00043     /// \brief
00044     /// Gets the minimum X coordinate value.
00045     /// 
00046     /// \remarks
00047     /// This is the smallest X ordinate value for the envelope, regardless
00048     /// of the sense of the axes.  In a conventional right-handed system,
00049     /// this would be the X coordinate for the point in the rear, lower-left
00050     /// corner of the envelope.
00051     /// 
00052     /// \return
00053     /// Returns the miniumum X ordinate; numeric_limits<double>::quiet_NaN() by default
00054     /// 
00055     FDO_GEOM_API virtual double GetMinX() const = 0;
00056 
00057     /// \brief
00058     /// Gets the minimum Y coordinate value.
00059     /// 
00060     /// \remarks
00061     /// This is the smallest Y ordinate value for the envelope, regardless
00062     /// of the sense of the axes.  In a conventional right-handed system,
00063     /// this would be the Y coordinate for the point in the rear, lower-left
00064     /// corner of the envelope.
00065     /// 
00066     /// \return
00067     /// Returns the miniumum Y ordinate; numeric_limits<double>::quiet_NaN() by default
00068     /// 
00069     FDO_GEOM_API virtual double GetMinY() const = 0;
00070 
00071     /// \brief
00072     /// Gets the minimum Z coordinate value.
00073     /// 
00074     /// \remarks
00075     /// This is the smallest Z ordinate value for the envelope, regardless
00076     /// of the sense of the axes.  In a conventional right-handed system,
00077     /// this would be the Z coordinate for the point in the rear, lower-left
00078     /// corner of the envelope.
00079     /// 
00080     /// \return
00081     /// Returns the miniumum Z ordinate; numeric_limits<double>::quiet_NaN() by default
00082     /// 
00083     FDO_GEOM_API virtual double GetMinZ() const = 0;
00084 
00085     /// \brief
00086     /// Gets the maximum X coordinate value.
00087     /// 
00088     /// \remarks
00089     /// This is the largest X ordinate value for the envelope, regardless
00090     /// of the sense of the axes.  In a conventional right-handed system,
00091     /// this would be the X coordinate for the point in the front, upper-right
00092     /// corner of the envelope.
00093     /// 
00094     /// \return
00095     /// Returns the maxiumum X ordinate; numeric_limits<double>::quiet_NaN() by default
00096     /// 
00097     FDO_GEOM_API virtual double GetMaxX() const = 0;
00098 
00099     /// \brief
00100     /// Gets the maximum Y coordinate value.
00101     /// 
00102     /// \remarks
00103     /// This is the largest Y ordinate value for the envelope, regardless
00104     /// of the sense of the axes.  In a conventional right-handed system,
00105     /// this would be the Y coordinate for the point in the front, upper-right
00106     /// corner of the envelope.
00107     /// 
00108     /// \return
00109     /// Returns the maxiumum Y ordinate; numeric_limits<double>::quiet_NaN() by default
00110     /// 
00111     FDO_GEOM_API virtual double GetMaxY() const = 0;
00112 
00113     /// \brief
00114     /// Gets the maximum Z coordinate value.
00115     /// 
00116     /// \remarks
00117     /// This is the largest Z ordinate value for the envelope, regardless
00118     /// of the sense of the axes.  In a conventional right-handed system,
00119     /// this would be the Z coordinate for the point in the front, upper-right
00120     /// corner of the envelope.
00121     /// 
00122     /// \return
00123     /// Returns the maxiumum Z ordinate; numeric_limits<double>::quiet_NaN() by default
00124     /// 
00125     FDO_GEOM_API virtual double GetMaxZ() const = 0;
00126 
00127     /// \brief
00128     /// Gets the ordinates as an array.
00129     /// 
00130     /// \remarks
00131     /// The caller must not free the returned array.
00132     /// The ordinates are in the order XYZXYZ, with only those present 
00133     /// according to the dimensionality.
00134     /// 
00135     /// \return
00136     /// Returns the ordinates
00137     /// 
00138     FDO_GEOM_API virtual const double * GetOrdinates() = 0;
00139 
00140     /// \brief
00141     /// Indicates whether the envelope's extents are set.
00142     /// 
00143     /// \return
00144     /// Returns 'true' if none of the X, Y and Z extents have been set; 'false' otherwise
00145     /// 
00146     FDO_GEOM_API virtual bool GetIsEmpty() const = 0;
00147 
00148 protected:
00149 
00150     /// \brief
00151     /// Constructs a default instance.
00152     /// 
00153     /// \return
00154     /// Returns nothing
00155     /// 
00156     FDO_GEOM_API FdoIEnvelope() {};
00157 
00158     /// \brief
00159     /// Default destructor.
00160     /// 
00161     /// \return
00162     /// Returns nothing
00163     /// 
00164     FDO_GEOM_API virtual ~FdoIEnvelope() {};
00165 
00166 };
00167 #endif
00168 
00169 

Comments or suggestions? Send us feedback.