1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Partitioning/decimation module for the SALOME v3.2 platform
22 * \file MULTIPR_PointOfField.hxx
24 * \brief Class PointOfField used for decimation. PointOfField = a point in a field = coordinates + value.
26 * \author Olivier LE ROUX - CS, Virtual Reality Dpt
31 #ifndef MULTIPR_POINTOFFIELD_HXX
32 #define MULTIPR_POINTOFFIELD_HXX
34 //*****************************************************************************
36 //*****************************************************************************
48 //*****************************************************************************
50 //*****************************************************************************
57 * Builds an empty set of elements (default constructor).
59 PointOfField() { reset(); }
63 * \param pX x-coordinate of the point.
64 * \param pY y-coordinate of the point.
65 * \param pZ z-coordinate of the point.
66 * \param pVal value of the field at the given point.
68 PointOfField(med_float pX, med_float pY, med_float pZ, med_float pVal)
77 * Destructor. Removes everything.
79 ~PointOfField() { reset(); }
82 * Resets this object in its state by default (empty).
86 mXYZ[0] = std::numeric_limits<med_float>::quiet_NaN();
87 mXYZ[1] = std::numeric_limits<med_float>::quiet_NaN();
88 mXYZ[2] = std::numeric_limits<med_float>::quiet_NaN();
89 mVal = std::numeric_limits<med_float>::quiet_NaN();
93 * Dumps any PointOfField to the given output stream.
94 * \param pOs any output stream.
95 * \param pP any PointOfField.
96 * \return the output stream pOs.
98 friend std::ostream& operator<<(std::ostream& pOs, PointOfField& pP)
100 pOs << "[ " << pP.mXYZ[0] << " ; " << pP.mXYZ[1] << " ; " << pP.mXYZ[2] << "]: " << pP.mVal;
106 med_float mXYZ[3]; /**< 3D-position. */
107 med_float mVal; /**< Value of the field at this point. */
109 }; // class PointOfField
112 } // namespace multipr
115 #endif // MULTIPR_FIELDPOINT_HXX