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
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00062 #ifndef __vtkProp3D_h
00063 #define __vtkProp3D_h
00064
00065 #include "vtkProp.h"
00066 #include "vtkTransform.h"
00067
00068 class vtkRenderer;
00069
00070 class VTK_EXPORT vtkProp3D : public vtkProp
00071 {
00072 public:
00073 vtkTypeMacro(vtkProp3D,vtkProp);
00074 void PrintSelf(ostream& os, vtkIndent indent);
00075
00077 void ShallowCopy(vtkProp *prop);
00078
00080 vtkSetVector3Macro(Position,float);
00081 vtkGetVectorMacro(Position,float,3);
00082 void AddPosition(float deltaPosition[3]);
00083 void AddPosition(float deltaX,float deltaY,float deltaZ);
00084
00087 vtkSetVector3Macro(Origin,float);
00088 vtkGetVectorMacro(Origin,float,3);
00089
00093 vtkSetVector3Macro(Scale,float);
00094 vtkGetVectorMacro(Scale,float,3);
00095
00097 void SetScale(float s) {this->SetScale(s,s,s);};
00098
00108 void SetUserTransform(vtkLinearTransform *transform);
00109 vtkGetObjectMacro(UserTransform,vtkLinearTransform);
00110
00112 void SetUserMatrix(vtkMatrix4x4 *matrix);
00113 vtkMatrix4x4 *GetUserMatrix() {
00114 if (this->UserTransform) { this->UserTransform->Update(); };
00115 return this->UserMatrix; };
00116
00120 virtual void GetMatrix(vtkMatrix4x4 *m);
00121 virtual void GetMatrix(double m[16]);
00122
00126 void GetBounds(float bounds[6]);
00127 virtual float *GetBounds() = 0;
00128
00130 float *GetCenter();
00131
00133 float *GetXRange();
00134
00136 float *GetYRange();
00137
00139 float *GetZRange();
00140
00142 float GetLength();
00143
00149 void RotateX(float);
00150
00156 void RotateY(float);
00157
00163 void RotateZ(float);
00164
00168 void RotateWXYZ(float,float,float,float);
00169
00173 void SetOrientation(float,float,float);
00174
00178 void SetOrientation(float a[3]);
00179
00184 float *GetOrientation();
00185 void GetOrientation(float o[3]);
00186
00188 float *GetOrientationWXYZ();
00189
00193 void AddOrientation(float,float,float);
00194
00198 void AddOrientation(float a[3]);
00199
00208 void PokeMatrix(vtkMatrix4x4 *matrix);
00209
00212 void InitPathTraversal();
00213
00215 vtkMatrix4x4 *GetMatrix()
00216 {
00217 this->GetMatrix(this->Matrix);
00218 return this->Matrix;
00219 }
00220
00221 #ifndef VTK_REMOVE_LEGACY_CODE
00222
00223 virtual void GetMatrix(vtkMatrix4x4 &m)
00224 {VTK_LEGACY_METHOD(GetMatrix,"3.2"); this->GetMatrix(&m);}
00225 virtual vtkMatrix4x4 *GetMatrixPointer();
00226 #endif
00227
00228 protected:
00229 vtkProp3D();
00230 ~vtkProp3D();
00231 vtkProp3D(const vtkProp3D&) {};
00232 void operator=(const vtkProp3D&) {};
00233
00234 vtkLinearTransform *UserTransform;
00235 vtkMatrix4x4 *UserMatrix;
00236 vtkMatrix4x4 *Matrix;
00237 vtkTimeStamp MatrixMTime;
00238 float Origin[3];
00239 float Position[3];
00240 float Orientation[3];
00241 float Scale[3];
00242 float Center[3];
00243 vtkTransform *Transform;
00244 float Bounds[6];
00245 vtkProp3D *CachedProp3D;
00246
00247 };
00248
00249 #endif
00250