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 "controler-gmap-types.hh"
00026 #include "parameter-object-ponderation.hh"
00027 #include "transformation-matrix.hh"
00028 #include "geometry.hh"
00029 using namespace std;
00030 using namespace GMap3d;
00031
00032 CParameterObjectPonderation::CParameterObjectPonderation(int ANbRef) :
00033 CParameter (ANbRef),
00034 FPonderationType (PONDERATION_POINT),
00035 FPonderationCenter (ORIGIN),
00036 FPonderationVector (OZ),
00037 FPonderationStretchIn (false),
00038 FPonderationStretchInMin (0.0),
00039 FPonderationStretchInMax (1.0),
00040 FPonderationFunctionType (FUNCTION_LIN),
00041 FPonderationStretchOut (false),
00042 FPonderationStretchOutMin(0.75),
00043 FPonderationStretchOutMax(1.50)
00044 {}
00045
00046 CParameterObjectPonderation::
00047 CParameterObjectPonderation(const CParameterObjectPonderation & AParam) :
00048 CParameter (AParam),
00049 FPonderationType (AParam.FPonderationType),
00050 FPonderationCenter (AParam.FPonderationCenter),
00051 FPonderationVector (AParam.FPonderationVector),
00052 FPonderationStretchIn (AParam.FPonderationStretchIn),
00053 FPonderationStretchInMin (AParam.FPonderationStretchInMin),
00054 FPonderationStretchInMax (AParam.FPonderationStretchInMax),
00055 FPonderationFunctionType (AParam.FPonderationFunctionType),
00056 FPonderationStretchOut (AParam.FPonderationStretchOut),
00057 FPonderationStretchOutMin(AParam.FPonderationStretchOutMin),
00058 FPonderationStretchOutMax(AParam.FPonderationStretchOutMax)
00059 {}
00060
00061 CParameterObjectPonderation::~CParameterObjectPonderation()
00062 {}
00063
00064 CParameter * CParameterObjectPonderation::copy() const
00065 { return new CParameterObjectPonderation(*this); }
00066
00067 void CParameterObjectPonderation::load(istream& )
00068 {}
00069
00070 void CParameterObjectPonderation::save(ostream& )
00071 {}
00072
00073 void CParameterObjectPonderation::reinit()
00074 {}
00075
00076 int CParameterObjectPonderation::getType() const
00077 {
00078 return PARAMETER_OBJECT_PONDERATION;
00079 }
00080
00081 void CParameterObjectPonderation::setPonderationType(TPonderationType
00082 APonderationType)
00083 {
00084 if (FPonderationType != APonderationType)
00085 {
00086 putAllNeedToUpdate();
00087 FPonderationType = APonderationType;
00088 }
00089 }
00090
00091 TPonderationType CParameterObjectPonderation::getPonderationType() const
00092 {
00093 return FPonderationType;
00094 }
00095
00096 void CParameterObjectPonderation::setPonderationCenter(const CVertex &
00097 APonderationCenter)
00098 {
00099 if (FPonderationCenter != APonderationCenter)
00100 {
00101 putAllNeedToUpdate();
00102 FPonderationCenter = APonderationCenter;
00103 }
00104 }
00105
00106 CVertex CParameterObjectPonderation::getPonderationCenter() const
00107 {
00108 return FPonderationCenter;
00109 }
00110
00111 void CParameterObjectPonderation::setPonderationVector(const CVertex &
00112 APonderationVector)
00113 {
00114 if (FPonderationVector != APonderationVector)
00115 {
00116 putAllNeedToUpdate();
00117 FPonderationVector = APonderationVector;
00118 }
00119 }
00120
00121 CVertex CParameterObjectPonderation::getPonderationVector() const
00122 {
00123 return FPonderationVector;
00124 }
00125
00126 void CParameterObjectPonderation::setPonderationStretchIn(bool AActive)
00127 {
00128 FPonderationStretchIn = AActive;
00129 }
00130
00131 bool CParameterObjectPonderation::getPonderationStretchIn() const
00132 {
00133 return FPonderationStretchIn;
00134 }
00135
00136 void CParameterObjectPonderation::setPonderationStretchInMin(float AMin)
00137 {
00138 FPonderationStretchInMin = AMin;
00139 }
00140
00141 float CParameterObjectPonderation::getPonderationStretchInMin() const
00142 {
00143 return FPonderationStretchInMin;
00144 }
00145
00146 void CParameterObjectPonderation::setPonderationStretchInMax(float AMax)
00147 {
00148 FPonderationStretchInMax = AMax;
00149 }
00150
00151 float CParameterObjectPonderation::getPonderationStretchInMax() const
00152 {
00153 return FPonderationStretchInMax;
00154 }
00155
00156 void CParameterObjectPonderation
00157 ::setPonderationFunctionType(TFunctionType AFunctionType)
00158 {
00159 FPonderationFunctionType = AFunctionType;
00160 }
00161
00162 TFunctionType
00163 CParameterObjectPonderation::getPonderationFunctionType() const
00164 {
00165 return FPonderationFunctionType;
00166 }
00167
00168 void CParameterObjectPonderation::setPonderationStretchOut(bool AActive)
00169 {
00170 FPonderationStretchOut = AActive;
00171 }
00172
00173 bool CParameterObjectPonderation::getPonderationStretchOut() const
00174 {
00175 return FPonderationStretchOut;
00176 }
00177
00178 void CParameterObjectPonderation::setPonderationStretchOutMin(float AMin)
00179 {
00180 FPonderationStretchOutMin = AMin;
00181 }
00182
00183 float CParameterObjectPonderation::getPonderationStretchOutMin() const
00184 {
00185 return FPonderationStretchOutMin;
00186 }
00187
00188 void CParameterObjectPonderation::setPonderationStretchOutMax(float AMax)
00189 {
00190 FPonderationStretchOutMax = AMax;
00191 }
00192
00193 float CParameterObjectPonderation::getPonderationStretchOutMax() const
00194 {
00195 return FPonderationStretchOutMax;
00196 }
00197