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