]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/figureCuttingCylinderModel.cxx
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / figureCuttingCylinderModel.cxx
1
2 #include "figureCuttingCylinderModel.h"
3
4 figureCuttingCylinderModel::figureCuttingCylinderModel()
5 {
6 }
7 //----------------------------------------------------------------------------
8 figureCuttingCylinderModel::~figureCuttingCylinderModel()  // virtual
9 {
10 }
11 //----------------------------------------------------------------------------
12 bool figureCuttingCylinderModel::IfPointInside(double x, double y, double z) // virtual
13 {
14         double in[4],out[4];
15         in[0]=x;
16         in[1]=y;
17         in[2]=z;
18         in[3]=1;
19         _inversModel->MultiplyPoint (in, out);
20
21         bool result=false;
22         if ((sqrt( out[0]*out[0] + out[2]*out[2] )<0.5 )  && (out[1]>-0.5) && (out[1]<0.5)  )
23         {
24                 result=true;
25         }
26         return result;
27 }
28 //----------------------------------------------------------------------------
29 double figureCuttingCylinderModel::GetTheoricVolume() // virtual
30 {
31         double piTMP=3.14159265;
32         return piTMP*(_sx/2)*(_sz/2)*_sy;
33 }
34 //----------------------------------------------------------------------------
35 char *figureCuttingCylinderModel::GetName() // virtual
36 {
37         return "Cylinder";
38 }
39 //----------------------------------------------------------------------------