Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

graphics/vtkProp3D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProp3D.h,v $
00005   Language:  C++
00006 
00007 
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00009 All rights reserved.
00010 
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013 
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016 
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020 
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024 
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027 
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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; //support the PokeMatrix() method
00246   
00247 };
00248 
00249 #endif
00250 

Generated on Wed Nov 21 12:27:02 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001