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