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 =========================================================================*/
28 #ifndef vtkSpherePuzzle_h
29 #define vtkSpherePuzzle_h
30 
31 #include "vtkFiltersModelingModule.h" // For export macro
32 #include "vtkPolyDataAlgorithm.h"
33 
34 #define VTK_MAX_SPHERE_RESOLUTION 1024
35 
36 class vtkTransform;
37 
38 class VTKFILTERSMODELING_EXPORT vtkSpherePuzzle : public vtkPolyDataAlgorithm
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
44  static vtkSpherePuzzle *New();
45 
49  void Reset();
50 
54  void MoveHorizontal(int section, int percentage, int rightFlag);
55 
59  void MoveVertical(int section, int percentage, int rightFlag);
60 
69  int SetPoint(double x, double y, double z);
70 
76  void MovePoint(int percentage);
77 
81  int *GetState() {return this->State;}
82 
83 protected:
85  ~vtkSpherePuzzle();
86 
88  void MarkVertical(int section);
89  void MarkHorizontal(int section);
90 
91  int State[32];
92 
93  // Stuff for storing a partial move.
94  int PieceMask[32];
96 
97  // Colors for faces.
98  unsigned char Colors[96];
99 
100  // State for potential move.
101  int Active;
104  int Section;
105 
106 private:
107  vtkSpherePuzzle(const vtkSpherePuzzle&) VTK_DELETE_FUNCTION;
108  void operator=(const vtkSpherePuzzle&) VTK_DELETE_FUNCTION;
109 };
110 
111 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:60
static vtkPolyDataAlgorithm * New()
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:39
int * GetState()
For drawing state as arrows.
vtkTransform * Transform
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.