dox/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
00031
#ifndef __vtkSpherePuzzle_h
00032
#define __vtkSpherePuzzle_h
00033
00034
#include "vtkPolyDataSource.h"
00035
00036 #define VTK_MAX_SPHERE_RESOLUTION 1024
00037
00038
class vtkTransform;
00039
00040 class VTK_EXPORT vtkSpherePuzzle :
public vtkPolyDataSource
00041 {
00042
public:
00043 vtkTypeRevisionMacro(vtkSpherePuzzle,
vtkPolyDataSource);
00044
void PrintSelf(ostream& os,
vtkIndent indent);
00045
00046
static vtkSpherePuzzle *
New();
00047
00049
void Reset();
00050
00052
void MoveHorizontal(
int section,
int percentage,
int rightFlag);
00053
00055
void MoveVertical(
int section,
int percentage,
int rightFlag);
00056
00062
int SetPoint(
float x,
float y,
float z);
00063
00067
void MovePoint(
int percentage);
00068
00070 int *GetState() {
return this->State;}
00071
00072
protected:
00073 vtkSpherePuzzle();
00074 ~vtkSpherePuzzle();
00075
00076
void Execute();
00077
void MarkVertical(
int section);
00078
void MarkHorizontal(
int section);
00079
00080 int State[32];
00081
00082
00083 int PieceMask[32];
00084 vtkTransform *Transform;
00085
00086
00087 unsigned char Colors[96];
00088
00089
00090 int Active;
00091 int VerticalFlag;
00092 int RightFlag;
00093 int Section;
00094
00095
private:
00096 vtkSpherePuzzle(
const vtkSpherePuzzle&);
00097
void operator=(
const vtkSpherePuzzle&);
00098 };
00099
00100
#endif
00101
00102