Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "GEOM_Function.hxx"
00026
00027 #include <gp_XYZ.hxx>
00028
00029 #define ROTATE_ANGLE 1
00030 #define ROTATE_AXIS 2
00031 #define ROTATE_ORGN 3
00032 #define ROTATE_STEP1 4
00033 #define ROTATE_NBITER1 5
00034 #define ROTATE_NBITER2 6
00035 #define ROTATE_CENTRAL_POINT 7
00036 #define ROTATE_POINT1 8
00037 #define ROTATE_POINT2 9
00038 #define ROTATE_DIR2_X 10
00039 #define ROTATE_DIR2_Y 11
00040 #define ROTATE_DIR2_Z 12
00041
00042 class GEOMImpl_IRotate
00043 {
00044 public:
00045
00046 GEOMImpl_IRotate(Handle(GEOM_Function) theFunction): _func(theFunction) {}
00047
00048 void SetCentPoint(Handle(GEOM_Function) theCentPoint) { _func->SetReference(ROTATE_CENTRAL_POINT, theCentPoint); }
00049
00050 Handle(GEOM_Function) GetCentPoint() { return _func->GetReference(ROTATE_CENTRAL_POINT); }
00051
00052 void SetPoint1(Handle(GEOM_Function) thePoint1) { _func->SetReference(ROTATE_POINT1, thePoint1); }
00053
00054 Handle(GEOM_Function) GetPoint1() { return _func->GetReference(ROTATE_POINT1); }
00055
00056 void SetPoint2(Handle(GEOM_Function) thePoint2) { _func->SetReference(ROTATE_POINT2, thePoint2); }
00057
00058 Handle(GEOM_Function) GetPoint2() { return _func->GetReference(ROTATE_POINT2); }
00059
00060 void SetAngle(Standard_Real theAngle) { _func->SetReal(ROTATE_ANGLE, theAngle); }
00061
00062 Standard_Real GetAngle() { return _func->GetReal(ROTATE_ANGLE); }
00063
00064 void SetAxis(Handle(GEOM_Function) theVector) { _func->SetReference(ROTATE_AXIS, theVector); }
00065
00066 Handle(GEOM_Function) GetAxis() { return _func->GetReference(ROTATE_AXIS); }
00067
00068 void SetOriginal(Handle(GEOM_Function) theOriginal) { _func->SetReference(ROTATE_ORGN, theOriginal); }
00069
00070 Handle(GEOM_Function) GetOriginal() { return _func->GetReference(ROTATE_ORGN); }
00071
00072 void SetStep(double theStep) { _func->SetReal(ROTATE_STEP1, theStep); }
00073
00074 double GetStep() { return _func->GetReal(ROTATE_STEP1); }
00075
00076 void SetNbIter1(int theNbIter) { _func->SetInteger(ROTATE_NBITER1, theNbIter); }
00077
00078 int GetNbIter1() { return _func->GetInteger(ROTATE_NBITER1); }
00079
00080 void SetNbIter2(int theNbIter) { _func->SetInteger(ROTATE_NBITER2, theNbIter); }
00081
00082 int GetNbIter2() { return _func->GetInteger(ROTATE_NBITER2); }
00083
00084 void SetDir2 (gp_XYZ theDir2)
00085 {
00086 _func->SetReal(ROTATE_DIR2_X, theDir2.X());
00087 _func->SetReal(ROTATE_DIR2_Y, theDir2.Y());
00088 _func->SetReal(ROTATE_DIR2_Z, theDir2.Z());
00089 }
00090
00091 gp_XYZ GetDir2()
00092 {
00093 gp_XYZ aRes (0., 0., 0.);
00094 aRes.SetX(_func->GetReal(ROTATE_DIR2_X));
00095 aRes.SetY(_func->GetReal(ROTATE_DIR2_Y));
00096 aRes.SetZ(_func->GetReal(ROTATE_DIR2_Z));
00097 return aRes;
00098 }
00099
00100 private:
00101
00102 Handle(GEOM_Function) _func;
00103 };