rsvs3D  0.0.0
Codes for the c++ implementation of the 3D RSVS
polyscopersvs.hpp
Go to the documentation of this file.
1 
21 #ifndef POLYSCOPERSVS_H_INCLUDED
22 #define POLYSCOPERSVS_H_INCLUDED
23 
24 namespace integrate
25 {
26 class RSVSclass;
27 }
28 
29 class mesh;
30 class snake;
31 #include <string>
32 #include <vector>
33 
38 namespace polyscopersvs
39 {
41 extern bool POLYSCOPE_INITIALISED;
42 
54 {
55  private:
57  bool isHeadless;
58 
59  public:
60  PolyScopeRSVS();
73  void show(size_t forFrames = SIZE_MAX);
83  void addMesh(std::string name, const mesh &meshIn);
90  void addSnake(std::string name, const snake &snakeIn);
95  void addSurfaceProperties(std::string name, const mesh &surfaceMesh);
108  float addCells(std::string name, const mesh &meshIn, const std::vector<int> &&cellIndices, bool isIndex = true);
119 };
120 
122 namespace test
123 {
125 extern bool TEST_HEADLESS;
126 int init();
127 int show();
128 int meshShow();
129 } // namespace test
130 
131 } // namespace polyscopersvs
132 #endif
Class for mesh handling.
Definition: mesh.hpp:592
A structure containing the information about the polyscope display and the RSVS elements to display.
void addMesh(std::string name, const mesh &meshIn)
Add a mesh with a given name to the polyscope window.
float addCells(std::string name, const mesh &meshIn, const std::vector< int > &&cellIndices, bool isIndex=true)
Plot specified volume elements into polyscope.
bool isHeadless
Captures whether the RSVS window is being displayed or not.
PolyScopeRSVS()
Initialize polyscope, creating graphics contexts and constructing a window.
void addSurfaceProperties(std::string name, const mesh &surfaceMesh)
Adds properties of the surface of a snake to it's mesh as scalar quantities.
void show(size_t forFrames=SIZE_MAX)
Show the polyscope window.
void setInteractiveCallback(integrate::RSVSclass &RSVSobj)
Set polyscope's user callback to a lambda which allows control of the RSVSobj.
void addSnake(std::string name, const snake &snakeIn)
PLot a snake with it's velocity in the given polyscope window.
Definition: snake.hpp:83
int show()
Should display the polyscope window.
int init()
Should initialise polyscope.
bool TEST_HEADLESS
Boolean controlling wether tests are run in headless mode or not.
int meshShow()
Should display a single small cubic mesh.
Namespace containing interfaces to polyscope for RSVS objects.
bool POLYSCOPE_INITIALISED
Flag controlling wether polyscope has been initialised or not.