VTK
vtkSpherePuzzle.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSpherePuzzle.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
27 #ifndef vtkSpherePuzzle_h
28 #define vtkSpherePuzzle_h
29 
30 #include "vtkFiltersModelingModule.h" // For export macro
31 #include "vtkPolyDataAlgorithm.h"
32 
33 #define VTK_MAX_SPHERE_RESOLUTION 1024
34 
35 class vtkTransform;
36 
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
43  static vtkSpherePuzzle *New();
44 
46  void Reset();
47 
49  void MoveHorizontal(int section, int percentage, int rightFlag);
50 
52  void MoveVertical(int section, int percentage, int rightFlag);
53 
59  int SetPoint(double x, double y, double z);
60 
64  void MovePoint(int percentage);
65 
67  int *GetState() {return this->State;}
68 
69 protected:
71  ~vtkSpherePuzzle();
72 
74  void MarkVertical(int section);
75  void MarkHorizontal(int section);
76 
77  int State[32];
78 
79  // Stuff for storing a partial move.
80  int PieceMask[32];
82 
83  // Colors for faces.
84  unsigned char Colors[96];
85 
86  // State for potential move.
87  int Active;
89  int RightFlag;
90  int Section;
91 
92 private:
93  vtkSpherePuzzle(const vtkSpherePuzzle&); // Not implemented
94  void operator=(const vtkSpherePuzzle&); // Not implemented
95 };
96 
97 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKFILTERSMODELING_EXPORT
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
create a polygonal sphere centered at the origin
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkTransform * Transform
Store zero or more vtkInformation instances.