+// =======================================================================
+// function : gp_Cone
+// purpose :
+// =======================================================================
+inline gp_Cone::gp_Cone (const gp_Ax3& theA3,
+ const Standard_Real theAng,
+ const Standard_Real theRadius)
+: pos (theA3),
+ radius (theRadius),
+ semiAngle (theAng)
+{
+ Standard_Real aVal = theAng;
+ if (aVal < 0)
+ {
+ aVal = -aVal;
+ }
+ Standard_ConstructionError_Raise_if (theRadius < 0. || aVal <= gp::Resolution() || M_PI * 0.5 - aVal <= gp::Resolution(),
+ "gp_Cone() - invalid construction parameters");
+}
+
+// =======================================================================
+// function : SetSemiAngle
+// purpose :
+// =======================================================================
+inline void gp_Cone::SetSemiAngle (const Standard_Real theAng)
+{
+ Standard_Real aVal = theAng;
+ if (aVal < 0)
+ {
+ aVal = -aVal;
+ }
+ Standard_ConstructionError_Raise_if (aVal <= gp::Resolution() || M_PI * 0.5 - aVal <= gp::Resolution(),
+ "gp_Cone::SetSemiAngle() - invalid angle range");
+ semiAngle = theAng;
+}
+
+// =======================================================================
+// function : Scale
+// purpose :
+// =======================================================================
+inline void gp_Cone::Scale (const gp_Pnt& theP,
+ const Standard_Real theS)
+{
+ pos.Scale (theP, theS);
+ radius *= theS;
+ if (radius < 0)
+ {
+ radius = -radius;
+ }
+}
+
+// =======================================================================
+// function : Scaled
+// purpose :
+// =======================================================================
+inline gp_Cone gp_Cone::Scaled (const gp_Pnt& theP,
+ const Standard_Real theS) const
+{
+ gp_Cone aC = *this;
+ aC.pos.Scale (theP, theS);
+ aC.radius *= theS;
+ if (aC.radius < 0)
+ {
+ aC.radius = -aC.radius;
+ }
+ return aC;
+}
+
+// =======================================================================
+// function : Transform
+// purpose :
+// =======================================================================
+inline void gp_Cone::Transform (const gp_Trsf& theT)
+{
+ pos.Transform (theT);
+ radius *= theT.ScaleFactor();
+ if (radius < 0)
+ {
+ radius = -radius;
+ }
+}
+
+// =======================================================================
+// function : Transformed
+// purpose :
+// =======================================================================
+inline gp_Cone gp_Cone::Transformed (const gp_Trsf& theT) const
+{
+ gp_Cone aC = *this;
+ aC.pos.Transform (theT);
+ aC.radius *= theT.ScaleFactor();
+ if (aC.radius < 0)
+ {
+ aC.radius = -aC.radius;
+ }
+ return aC;
+}