Graphics/vtkSpherePuzzle.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00042 #ifndef __vtkSpherePuzzle_h
00043 #define __vtkSpherePuzzle_h
00044
00045 #include "vtkPolyDataSource.h"
00046
00047 #define VTK_MAX_SPHERE_RESOLUTION 1024
00048
00049 class vtkTransform;
00050
00051 class VTK_EXPORT vtkSpherePuzzle : public vtkPolyDataSource
00052 {
00053 public:
00054 vtkTypeRevisionMacro(vtkSpherePuzzle,vtkPolyDataSource);
00055 void PrintSelf(ostream& os, vtkIndent indent);
00056
00057 static vtkSpherePuzzle *New();
00058
00060 void Reset();
00061
00063 void MoveHorizontal(int section, int percentage, int rightFlag);
00064
00066 void MoveVertical(int section, int percentage, int rightFlag);
00067
00073 int SetPoint(float x, float y, float z);
00074
00078 void MovePoint(int percentage);
00079
00081 int *GetState() {return this->State;}
00082
00083 protected:
00084 vtkSpherePuzzle();
00085 ~vtkSpherePuzzle();
00086
00087 void Execute();
00088 void MarkVertical(int section);
00089 void MarkHorizontal(int section);
00090
00091 int State[32];
00092
00093
00094 int PieceMask[32];
00095 vtkTransform *Transform;
00096
00097
00098 unsigned char Colors[96];
00099
00100
00101 int Active;
00102 int VerticalFlag;
00103 int RightFlag;
00104 int Section;
00105
00106 private:
00107 vtkSpherePuzzle(const vtkSpherePuzzle&);
00108 void operator=(const vtkSpherePuzzle&);
00109 };
00110
00111 #endif
00112
00113