ParaView
vtkMoleculeRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVDataRepresentation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
15 
16 #ifndef vtkMoleculeRepresentation_h
17 #define vtkMoleculeRepresentation_h
18 
19 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
21 
22 #include "vtkNew.h" // For vtkNew.
23 
24 class vtkActor;
25 class vtkMolecule;
26 class vtkMoleculeMapper;
27 class vtkPVCacheKeeper;
28 class vtkScalarsToColors;
29 
30 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkMoleculeRepresentation
32 {
33 public:
34  static vtkMoleculeRepresentation* New();
35  vtkTypeMacro(vtkMoleculeRepresentation, vtkPVDataRepresentation) void PrintSelf(
36  ostream& os, vtkIndent indent);
37 
38  virtual int ProcessViewRequest(
39  vtkInformationRequestKey* requestType, vtkInformation* inputInfo, vtkInformation* outputInfo);
40 
41  virtual void SetVisibility(bool value);
42 
43  vtkGetMacro(MoleculeRenderMode, int) void SetMoleculeRenderMode(int mode);
44 
45  vtkGetMacro(UseCustomRadii, bool) void SetUseCustomRadii(bool val);
46 
47  void SetLookupTable(vtkScalarsToColors* lut);
48 
49  // Description:
50  // No-op. For compatibility with vtkPVCompositeRepresentation, which calls
51  // SetRepresentation on it's subproxies.
52  void SetRepresentation(const char*) {}
53 
54  // Description:
55  // Returns the data object that is rendered from the given input port.
56  virtual vtkDataObject* GetRenderedDataObject(int port);
57 
58  void MarkModified();
59 
60 protected:
63 
64  virtual int FillInputPortInformation(int port, vtkInformation* info);
65  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
66  virtual bool AddToView(vtkView* view);
67  virtual bool RemoveFromView(vtkView* view);
68 
69  bool IsCached(double cache_key);
70 
71  void SyncMapper();
72  void UpdateColoringParameters();
73 
74  vtkActor* Actor;
75  vtkMoleculeMapper* Mapper;
76 
77  vtkNew<vtkPVCacheKeeper> CacheKeeper;
78  vtkNew<vtkMolecule> DummyMolecule;
79 
82 
83  double DataBounds[6];
84 
85 private:
86  vtkMoleculeRepresentation(const vtkMoleculeRepresentation&) VTK_DELETE_FUNCTION;
87  void operator=(const vtkMoleculeRepresentation&) VTK_DELETE_FUNCTION;
88 };
89 
90 #endif // vtkMoleculeRepresentation_h
virtual vtkDataObject * GetRenderedDataObject(int vtkNotUsed(port))
Returns the data object that is rendered from the given input port.
vtkPVDataRepresentation adds some ParaView specific API to data representations.
virtual bool IsCached(double cache_key)
Subclasses should override this method when they support caching to indicate if the particular key is...
vtkNew< vtkPVCacheKeeper > CacheKeeper
virtual bool AddToView(vtkView *view)
Making these methods public.
virtual void MarkModified()
This is one of the most important functions.
virtual bool RemoveFromView(vtkView *view)
Making these methods public.
manages data cache for flip book animations.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Overridden to invoke vtkCommand::UpdateDataEvent.
vtkNew< vtkMolecule > DummyMolecule