00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 //NOTE: This is an intreface to a function for the Prism creation. 00024 00025 #include "GEOM_Function.hxx" 00026 00027 #define PRISM_ARG_H 1 00028 #define PRISM_ARG_VEC 2 00029 #define PRISM_ARG_BASE 3 00030 #define PRISM_ARG_PNT_F 4 00031 #define PRISM_ARG_PNT_L 5 00032 #define PRISM_ARG_DX 6 00033 #define PRISM_ARG_DY 7 00034 #define PRISM_ARG_DZ 8 00035 #define PRISM_ARG_SCALE 9 00036 00037 class GEOMImpl_IPrism 00038 { 00039 public: 00040 00041 GEOMImpl_IPrism(Handle(GEOM_Function) theFunction): _func(theFunction) {} 00042 00043 void SetBase (Handle(GEOM_Function) theRefBase ) { _func->SetReference(PRISM_ARG_BASE, theRefBase); } 00044 void SetVector(Handle(GEOM_Function) theRefVector) { _func->SetReference(PRISM_ARG_VEC , theRefVector); } 00045 void SetFirstPoint(Handle(GEOM_Function) thePoint) { _func->SetReference(PRISM_ARG_PNT_F, thePoint); } 00046 void SetLastPoint (Handle(GEOM_Function) thePoint) { _func->SetReference(PRISM_ARG_PNT_L, thePoint); } 00047 00048 Handle(GEOM_Function) GetBase () { return _func->GetReference(PRISM_ARG_BASE); } 00049 Handle(GEOM_Function) GetVector() { return _func->GetReference(PRISM_ARG_VEC ); } 00050 Handle(GEOM_Function) GetFirstPoint() { return _func->GetReference(PRISM_ARG_PNT_F ); } 00051 Handle(GEOM_Function) GetLastPoint () { return _func->GetReference(PRISM_ARG_PNT_L ); } 00052 00053 void SetDX(double theDX) { _func->SetReal(PRISM_ARG_DX, theDX); } 00054 void SetDY(double theDY) { _func->SetReal(PRISM_ARG_DY, theDY); } 00055 void SetDZ(double theDZ) { _func->SetReal(PRISM_ARG_DZ, theDZ); } 00056 00057 double GetDX() { return _func->GetReal(PRISM_ARG_DX); } 00058 double GetDY() { return _func->GetReal(PRISM_ARG_DY); } 00059 double GetDZ() { return _func->GetReal(PRISM_ARG_DZ); } 00060 00061 void SetH(double theH) { _func->SetReal(PRISM_ARG_H, theH); } 00062 00063 double GetH() { return _func->GetReal(PRISM_ARG_H); } 00064 00065 void SetScale(double theH) { _func->SetReal(PRISM_ARG_SCALE, theH); } 00066 00067 double GetScale() { return _func->GetReal(PRISM_ARG_SCALE); } 00068 00069 private: 00070 00071 Handle(GEOM_Function) _func; 00072 };