File indexing completed on 2026-09-17 09:21:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _Select3D_PointData_HeaderFile
0015 #define _Select3D_PointData_HeaderFile
0016
0017 #include <Select3D_Pnt.hxx>
0018
0019
0020 class Select3D_PointData
0021 {
0022
0023 public:
0024
0025
0026 Select3D_PointData(const int theNbPoints)
0027 : mynbpoints(theNbPoints)
0028 {
0029 if (theNbPoints <= 0)
0030 throw Standard_ConstructionError("Select3D_PointData");
0031
0032 mypolyg3d = new Select3D_Pnt[mynbpoints];
0033 }
0034
0035
0036 ~Select3D_PointData() { delete[] mypolyg3d; }
0037
0038
0039
0040 void SetPnt(const int theIndex, const Select3D_Pnt& theValue)
0041 {
0042 if (theIndex < 0 || theIndex >= mynbpoints)
0043 throw Standard_OutOfRange("Select3D_PointData::SetPnt");
0044 mypolyg3d[theIndex] = theValue;
0045 }
0046
0047
0048
0049 void SetPnt(const int theIndex, const gp_Pnt& theValue)
0050 {
0051 if (theIndex < 0 || theIndex >= mynbpoints)
0052 throw Standard_OutOfRange("Select3D_PointData::SetPnt");
0053 mypolyg3d[theIndex] = theValue;
0054 }
0055
0056
0057
0058 const Select3D_Pnt& Pnt(const int theIndex) const
0059 {
0060 if (theIndex < 0 || theIndex >= mynbpoints)
0061 throw Standard_OutOfRange("Select3D_PointData::Pnt");
0062 return mypolyg3d[theIndex];
0063 }
0064
0065
0066
0067 gp_Pnt Pnt3d(const int theIndex) const
0068 {
0069 if (theIndex < 0 || theIndex >= mynbpoints)
0070 throw Standard_OutOfRange("Select3D_PointData::Pnt");
0071 return mypolyg3d[theIndex];
0072 }
0073
0074
0075 int Size() const { return mynbpoints; }
0076
0077 private:
0078 Select3D_PointData(const Select3D_PointData&) = delete;
0079 Select3D_PointData& operator=(const Select3D_PointData&) = delete;
0080
0081 private:
0082 Select3D_Pnt* mypolyg3d;
0083 int mynbpoints;
0084 };
0085
0086 #endif