-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathquantity.cpp
More file actions
40 lines (23 loc) · 986 Bytes
/
quantity.cpp
File metadata and controls
40 lines (23 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2017-2023, Nicholas Sharp and the Polyscope contributors. https://polyscope.run
#include "polyscope/quantity.h"
#include "imgui.h"
#include "polyscope/messages.h"
#include "polyscope/structure.h"
namespace polyscope {
// === General Quantities
// (subclasses could be a structure-specific quantity or a floating quantity)
Quantity::Quantity(std::string name_, Structure& parentStructure_)
: parent(parentStructure_), name(name_), enabled(uniquePrefix() + "enabled", false) {
validateName(name);
}
Quantity::~Quantity(){};
void Quantity::draw() {}
void Quantity::drawDelayed() {}
void Quantity::buildUI() {}
void Quantity::buildCustomUI() {}
void Quantity::buildPickUI(size_t localPickInd) {}
bool Quantity::isEnabled() { return enabled.get(); }
void Quantity::refresh() { requestRedraw(); }
std::string Quantity::niceName() { return name; }
std::string Quantity::uniquePrefix() { return parent.uniquePrefix() + name + "#"; }
} // namespace polyscope