• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Graphics/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 =========================================================================*/
00024 #ifndef __vtkSpherePuzzle_h
00025 #define __vtkSpherePuzzle_h
00026 
00027 #include "vtkPolyDataAlgorithm.h"
00028 
00029 #define VTK_MAX_SPHERE_RESOLUTION 1024
00030 
00031 class vtkTransform;
00032 
00033 class VTK_GRAPHICS_EXPORT vtkSpherePuzzle : public vtkPolyDataAlgorithm 
00034 {
00035 public:
00036   vtkTypeRevisionMacro(vtkSpherePuzzle,vtkPolyDataAlgorithm);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00038 
00039   static vtkSpherePuzzle *New();
00040 
00042   void Reset();
00043 
00045   void MoveHorizontal(int section, int percentage, int rightFlag);
00046 
00048   void MoveVertical(int section, int percentage, int rightFlag);
00049 
00055   int SetPoint(double x, double y, double z);  
00056 
00060   void MovePoint(int percentage);  
00061 
00063   int *GetState() {return this->State;}
00064 
00065 protected:
00066   vtkSpherePuzzle();
00067   ~vtkSpherePuzzle();
00068 
00069   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00070   void MarkVertical(int section);
00071   void MarkHorizontal(int section);  
00072   
00073   int State[32];
00074   
00075   // Stuff for storing a partial move.
00076   int PieceMask[32];
00077   vtkTransform *Transform;
00078 
00079   // Colors for faces.
00080   unsigned char Colors[96];
00081 
00082   // State for potential move.
00083   int Active;
00084   int VerticalFlag;
00085   int RightFlag;
00086   int Section;
00087 
00088 private:
00089   vtkSpherePuzzle(const vtkSpherePuzzle&); // Not implemented
00090   void operator=(const vtkSpherePuzzle&); // Not implemented
00091 };
00092 
00093 #endif

Generated by  doxygen 1.7.1