File indexing completed on 2025-01-18 10:04:52
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
0027 Select3D_PointData (const Standard_Integer theNbPoints)
0028 : mynbpoints(theNbPoints)
0029 {
0030 if (theNbPoints <= 0)
0031 throw Standard_ConstructionError("Select3D_PointData");
0032
0033 mypolyg3d = new Select3D_Pnt[mynbpoints];
0034 }
0035
0036
0037 ~Select3D_PointData ()
0038 {
0039 delete [] mypolyg3d;
0040 }
0041
0042
0043
0044 void SetPnt (const Standard_Integer theIndex,
0045 const Select3D_Pnt& theValue)
0046 {
0047 if (theIndex < 0 || theIndex >= mynbpoints)
0048 throw Standard_OutOfRange("Select3D_PointData::SetPnt");
0049 mypolyg3d[theIndex] = theValue;
0050 }
0051
0052
0053
0054 void SetPnt (const Standard_Integer theIndex,
0055 const gp_Pnt& theValue)
0056 {
0057 if (theIndex < 0 || theIndex >= mynbpoints)
0058 throw Standard_OutOfRange("Select3D_PointData::SetPnt");
0059 mypolyg3d[theIndex] = theValue;
0060 }
0061
0062
0063
0064 const Select3D_Pnt& Pnt (const Standard_Integer theIndex) const
0065 {
0066 if (theIndex < 0 || theIndex >= mynbpoints)
0067 throw Standard_OutOfRange("Select3D_PointData::Pnt");
0068 return mypolyg3d[theIndex];
0069 }
0070
0071
0072
0073 gp_Pnt Pnt3d (const Standard_Integer theIndex) const
0074 {
0075 if (theIndex < 0 || theIndex >= mynbpoints)
0076 throw Standard_OutOfRange("Select3D_PointData::Pnt");
0077 return mypolyg3d[theIndex];
0078 }
0079
0080
0081 Standard_Integer Size () const
0082 {
0083 return mynbpoints;
0084 }
0085
0086 private:
0087 Select3D_PointData (const Select3D_PointData&);
0088 Select3D_PointData& operator= (const Select3D_PointData&);
0089
0090 private:
0091
0092 Select3D_Pnt* mypolyg3d;
0093 Standard_Integer mynbpoints;
0094 };
0095
0096 #endif