File indexing completed on 2025-01-18 10:04:10
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _IntPolyh_Point_HeaderFile
0018 #define _IntPolyh_Point_HeaderFile
0019
0020 #include <Adaptor3d_Surface.hxx>
0021
0022
0023
0024 class IntPolyh_Point
0025 {
0026 public:
0027
0028 DEFINE_STANDARD_ALLOC
0029
0030
0031 IntPolyh_Point() :
0032 myX(0.), myY(0.), myZ(0.), myU(0.), myV(0.), myPOC(1), myDegenerated(Standard_False)
0033 {}
0034
0035 IntPolyh_Point(const Standard_Real x,
0036 const Standard_Real y,
0037 const Standard_Real z,
0038 const Standard_Real u,
0039 const Standard_Real v)
0040 :
0041 myX(x), myY(y), myZ(z), myU(u), myV(v), myPOC(1), myDegenerated(Standard_False)
0042 {}
0043
0044
0045 Standard_Real X() const
0046 {
0047 return myX;
0048 }
0049
0050 Standard_Real Y() const
0051 {
0052 return myY;
0053 }
0054
0055 Standard_Real Z() const
0056 {
0057 return myZ;
0058 }
0059
0060 Standard_Real U() const
0061 {
0062 return myU;
0063 }
0064
0065 Standard_Real V() const
0066 {
0067 return myV;
0068 }
0069
0070 Standard_Integer PartOfCommon() const
0071 {
0072 return myPOC;
0073 }
0074
0075
0076 void Set (const Standard_Real x,
0077 const Standard_Real y,
0078 const Standard_Real z,
0079 const Standard_Real u,
0080 const Standard_Real v,
0081 const Standard_Integer II = 1)
0082 {
0083 myX = x;
0084 myY = y;
0085 myZ = z;
0086 myU = u;
0087 myV = v;
0088 myPOC = II;
0089 }
0090
0091 void SetX (const Standard_Real x)
0092 {
0093 myX = x;
0094 }
0095
0096 void SetY (const Standard_Real y)
0097 {
0098 myY = y;
0099 }
0100
0101 void SetZ (const Standard_Real z)
0102 {
0103 myZ = z;
0104 }
0105
0106 void SetU (const Standard_Real u)
0107 {
0108 myU = u;
0109 }
0110
0111 void SetV (const Standard_Real v)
0112 {
0113 myV = v;
0114 }
0115
0116 void SetPartOfCommon (const Standard_Integer ii)
0117 {
0118 myPOC = ii;
0119 }
0120
0121 Standard_EXPORT void Middle (const Handle(Adaptor3d_Surface)& MySurface, const IntPolyh_Point& P1, const IntPolyh_Point& P2);
0122
0123 Standard_EXPORT IntPolyh_Point Add (const IntPolyh_Point& P1) const;
0124 IntPolyh_Point operator + (const IntPolyh_Point& P1) const
0125 {
0126 return Add(P1);
0127 }
0128
0129 Standard_EXPORT IntPolyh_Point Sub (const IntPolyh_Point& P1) const;
0130 IntPolyh_Point operator - (const IntPolyh_Point& P1) const
0131 {
0132 return Sub(P1);
0133 }
0134
0135 Standard_EXPORT IntPolyh_Point Divide (const Standard_Real rr) const;
0136 IntPolyh_Point operator / (const Standard_Real rr) const
0137 {
0138 return Divide(rr);
0139 }
0140
0141 Standard_EXPORT IntPolyh_Point Multiplication (const Standard_Real rr) const;
0142 IntPolyh_Point operator * (const Standard_Real rr) const
0143 {
0144 return Multiplication(rr);
0145 }
0146
0147 Standard_EXPORT Standard_Real SquareModulus() const;
0148
0149 Standard_EXPORT Standard_Real SquareDistance (const IntPolyh_Point& P2) const;
0150
0151 Standard_EXPORT Standard_Real Dot (const IntPolyh_Point& P2) const;
0152
0153 Standard_EXPORT void Cross (const IntPolyh_Point& P1, const IntPolyh_Point& P2);
0154
0155 Standard_EXPORT void Dump() const;
0156
0157 Standard_EXPORT void Dump (const Standard_Integer i) const;
0158
0159 void SetDegenerated (const Standard_Boolean theFlag)
0160 {
0161 myDegenerated = theFlag;
0162 }
0163
0164 Standard_Boolean Degenerated() const
0165 {
0166 return myDegenerated;
0167 }
0168
0169 protected:
0170
0171 private:
0172
0173 Standard_Real myX;
0174 Standard_Real myY;
0175 Standard_Real myZ;
0176 Standard_Real myU;
0177 Standard_Real myV;
0178 Standard_Integer myPOC;
0179 Standard_Boolean myDegenerated;
0180
0181 };
0182
0183 #endif