VTK
vtkWebGLObject.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWebGLObject.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 =========================================================================*/
20 #ifndef vtkWebGLObject_h
21 #define vtkWebGLObject_h
22 
23 #include "vtkObject.h"
24 #include "vtkWebGLExporterModule.h" // needed for export macro
25 
26 #include <string> // needed for ID and md5 storing
27 
28 class vtkMatrix4x4;
30 
32  wPOINTS = 0,
33  wLINES = 1,
35  };
36 
38 {
39 public:
40  static vtkWebGLObject* New();
41  vtkTypeMacro(vtkWebGLObject, vtkObject)
42  void PrintSelf(ostream &os, vtkIndent indent);
43 
44  virtual void GenerateBinaryData();
45  virtual unsigned char* GetBinaryData(int part);
46  virtual int GetBinarySize(int part);
47  virtual int GetNumberOfParts();
48 
52  void GetBinaryData(int part, vtkUnsignedCharArray* buffer);
53 
54  void SetLayer(int l);
55  void SetRendererId(size_t i);
56  void SetId(std::string i);
57  void SetWireframeMode(bool wireframe);
58  void SetVisibility(bool vis);
59  void SetTransformationMatrix(vtkMatrix4x4* m);
60  void SetIsWidget(bool w);
61  void SetHasTransparency(bool t);
62  void SetInteractAtServer(bool i);
63  void SetType(WebGLObjectTypes t);
64  bool isWireframeMode();
65  bool isVisible();
66  bool HasChanged();
67  bool isWidget();
68  bool HasTransparency();
69  bool InteractAtServer();
70  //BTX
71  std::string GetMD5();
72  std::string GetId();
73  //ETX
74  size_t GetRendererId();
75  int GetLayer();
76 
77 protected:
79  ~vtkWebGLObject();
80 
81  float Matrix[16];
82  size_t rendererId;
83  int layer; // Renderer Layer
84  std::string id; // Id of the object
85  std::string MD5;
86  bool hasChanged;
87  bool iswireframeMode;
88  bool isvisible;
89  WebGLObjectTypes webGlType;
90  bool hasTransparency;
91  bool iswidget;
92  bool interactAtServer;
93 
94 private:
95  vtkWebGLObject(const vtkWebGLObject&); // Not implemented
96  void operator=(const vtkWebGLObject&); // Not implemented
97 };
98 
99 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:38
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKWEBGLEXPORTER_EXPORT
dynamic, self-adjusting array of unsigned char
WebGLObjectTypes
static vtkObject * New()