Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkSpherePuzzle.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSpherePuzzle.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00027 #ifndef __vtkSpherePuzzle_h
00028 #define __vtkSpherePuzzle_h
00029 
00030 #include "vtkPolyDataAlgorithm.h"
00031 
00032 #define VTK_MAX_SPHERE_RESOLUTION 1024
00033 
00034 class vtkTransform;
00035 
00036 class VTK_GRAPHICS_EXPORT vtkSpherePuzzle : public vtkPolyDataAlgorithm 
00037 {
00038 public:
00039   vtkTypeRevisionMacro(vtkSpherePuzzle,vtkPolyDataAlgorithm);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00042   static vtkSpherePuzzle *New();
00043 
00045   void Reset();
00046 
00048   void MoveHorizontal(int section, int percentage, int rightFlag);
00049 
00051   void MoveVertical(int section, int percentage, int rightFlag);
00052   
00058   int SetPoint(double x, double y, double z);  
00059 
00063   void MovePoint(int percentage);  
00064 
00066   int *GetState() {return this->State;}
00067 
00068 protected:
00069   vtkSpherePuzzle();
00070   ~vtkSpherePuzzle();
00071 
00072   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00073   void MarkVertical(int section);
00074   void MarkHorizontal(int section);  
00075   
00076   int State[32];
00077   
00078   // Stuff for storing a partial move.
00079   int PieceMask[32];
00080   vtkTransform *Transform;
00081 
00082   // Colors for faces.
00083   unsigned char Colors[96];
00084 
00085   // State for potential move.
00086   int Active;
00087   int VerticalFlag;
00088   int RightFlag;
00089   int Section;
00090 
00091 private:
00092   vtkSpherePuzzle(const vtkSpherePuzzle&); // Not implemented
00093   void operator=(const vtkSpherePuzzle&); // Not implemented
00094 };
00095 
00096 #endif

Generated on Mon Jan 21 23:07:26 2008 for VTK by  doxygen 1.4.3-20050530