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 #ifndef PARAMETER_OBJECT_POSITION_HH
00026 #define PARAMETER_OBJECT_POSITION_HH
00027
00028 #include "parameter.hh"
00029 #include "vertex.hh"
00030 #include "transformation-matrix.hh"
00031
00032 namespace GMap3d
00033 {
00034 class CParameterObjectPosition : public CParameter
00035 {
00036 public:
00038 CParameterObjectPosition(bool ANeedRotation, int ANbRef = 0);
00039 CParameterObjectPosition(const CParameterObjectPosition &);
00040 virtual ~CParameterObjectPosition();
00041 virtual CParameter * copy() const;
00043
00045
00046 virtual void save(std::ostream &);
00047 virtual void load(std::istream &);
00048 virtual void reinit();
00049
00051
00053
00054 float getScale() const;
00055
00056 void setScale(float AScale);
00057
00058 float getProportionX() const;
00059 float getProportionY() const;
00060 float getProportionZ() const;
00061 CVertex getProportions() const;
00062
00063 void setProportionX(float AX);
00064 void setProportionY(float AY);
00065 void setProportionZ(float AZ);
00066 void setProportions(float AX, float AY, float AZ);
00067 void setProportions(const CVertex & AValues);
00068
00069 float getDimensionX() const;
00070 float getDimensionY() const;
00071 float getDimensionZ() const;
00072 CVertex getDimensions() const;
00073
00074 void setDimensionX(float AX);
00075 void setDimensionY(float AY);
00076 void setDimensionZ(float AZ);
00077 void setDimensions(float AX, float AY, float AZ);
00078 void setDimensions(const CVertex & AValues);
00079
00080 float getCenterX() const;
00081 float getCenterY() const;
00082 float getCenterZ() const;
00083 CVertex getCenter() const;
00084
00085 void setCenterX(float AX);
00086 void setCenterY(float AY);
00087 void setCenterZ(float AZ);
00088 void setCenter(float AX, float AY, float AZ);
00089 void setCenter(const CVertex & AVertex);
00090
00091 float getRotationX() const;
00092 float getRotationY() const;
00093 float getRotationZ() const;
00094 CVertex getRotations() const;
00095
00096 void setRotationX(float AAlpha);
00097 void setRotationY(float ABeta);
00098 void setRotationZ(float AGamma);
00099 void setRotations(float AAlpha, float ABeta, float AGamma);
00100 void setRotations(const CVertex & AAngles);
00101
00102 float getFirstVertexX() const;
00103 float getFirstVertexY() const;
00104 float getFirstVertexZ() const;
00105 CVertex getFirstVertex() const;
00106
00107 void setFirstVertexX(float AX, bool AKeepNormalVector = false);
00108 void setFirstVertexY(float AY, bool AKeepNormalVector = false);
00109 void setFirstVertexZ(float AZ, bool AKeepNormalVector = false);
00110 void setFirstVertex(float AX, float AY, float AZ,
00111 bool AKeepNormalVector = false);
00112 void setFirstVertex(const CVertex & AVertex,
00113 bool AKeepNormalVector = false);
00114
00115 float getNormalVectorX() const;
00116 float getNormalVectorY() const;
00117 float getNormalVectorZ() const;
00118 CVertex getNormalVector() const;
00119
00120 void setNormalVectorX(float AX);
00121 void setNormalVectorY(float AY);
00122 void setNormalVectorZ(float AZ);
00123 void setNormalVector(float AX, float AY, float AZ);
00124 void setNormalVector(const CVertex & AVector);
00125
00127
00129 CTransformationMatrix getTransformationMatrix() const;
00130
00132 virtual int getType() const;
00133
00134 private:
00135
00136 CVertex FCenter;
00137
00138
00139 float FScale;
00140
00141
00142 CVertex FProportions;
00143
00144
00145 CVertex FDimensions;
00146
00147
00148 CVertex FFirstVertex;
00149
00150
00151 CVertex FNormalVector;
00152
00153
00154 CVertex FRotations;
00155
00156
00157 bool FNeedRotation;
00158 };
00159
00160 }
00161
00162 #endif // PARAMETER_OBJECT_POSITION_HH
00163