Enzo
Loading...
Searching...
No Matches
Selection.h
1#pragma once
2#include "Engine/Network/NodePacket.h"
3#include "Engine/Primitives/Primitive.h"
4#include "Engine/Selection/SelectionComponent.h"
5#include <memory>
6#include <string>
7
8namespace enzo {
10{
11 public:
12 Selection(std::string expression);
13
14 void getPoints();
15 void getFaces();
16 void getVertices();
17 std::vector<std::shared_ptr<geo::Primitive>> getPrims(const NodePacket& packet);
18 bool containsPrim(geo::PrimPtr prim, bool full = false);
19 bool containsFace(geo::PrimPtr prim, Index index, Offset offset);
20 bool containsPoint(geo::PrimPtr prim, Index index, Offset offset);
21 bool containsVertex(geo::PrimPtr prim, Index index, Offset offset);
22 std::vector<Offset> getFaces(geo::PrimPtr prim);
23 std::vector<Offset> getPoints(geo::PrimPtr prim);
24 std::vector<Offset> getVertices(geo::PrimPtr prim);
25
26 void setInverted(bool inverted) { inverted_ = inverted; }
27 bool getInverted() const { return inverted_; }
28
29 private:
30 std::vector<std::unique_ptr<enzo::SelectionComponent>> components_;
31 bool inverted_ = false;
32};
33} // namespace enzo
size_t Offset
enzo::Offset is the internal discontinuous index of an element in a given AttributeOwner.
Definition Types.h:100
size_t Index
enzo::Index is the continuous index of an element in a given AttributeOwner.
Definition Types.h:91
Definition NodePacket.h:9
Definition Selection.h:10