00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
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
00079 int PieceMask[32];
00080 vtkTransform *Transform;
00081
00082
00083 unsigned char Colors[96];
00084
00085
00086 int Active;
00087 int VerticalFlag;
00088 int RightFlag;
00089 int Section;
00090
00091 private:
00092 vtkSpherePuzzle(const vtkSpherePuzzle&);
00093 void operator=(const vtkSpherePuzzle&);
00094 };
00095
00096 #endif