Polyhedral-net Splines
Loading...
Searching...
No Matches
Patch.hpp
1/* copyright(c)Jorg Peters [jorg.peters@gmail.com] */
2
3#pragma once
4
5#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
6#include <iostream>
7
8typedef OpenMesh::PolyMesh_ArrayKernelT<>::Point Point;
9
10extern "C" {
11
19struct Patch
20{
25 Patch();
26
32 Patch(int a_BiDeg);
33
40 Patch(int a_BiDeg, std::string a_Group);
41
48 Patch(int a_DegU, int a_DegV);
49
57 Patch(int a_DegU, int a_DegV, std::string a_Group);
58
64 Patch(const Patch& other) = default;
65
71 Patch(Patch&& other) noexcept = default;
72
79 Patch& operator=(const Patch& other);
80
87 Patch& operator=(Patch&& other) noexcept;
88
93 bool isValid() const;
94
98 void initBBcoefs();
99
105 void degRaise();
106
111 const std::string m_PatchType = "5";
112
123
128 std::string m_Group = "Group 0 default";
129
136 std::vector<std::vector<Point>> m_BBcoefs;
137};
138}
bool isValid() const
Checks if a patch is valid.
Definition Patch.cpp:46
void initBBcoefs()
intializes the control points array based on the degrees.
Definition Patch.cpp:60
int m_DegU
Degree in u direction.
Definition Patch.hpp:117
Patch()
Construct a new Patch object.
Definition Patch.cpp:9
std::string m_Group
Group name associated with the patch.
Definition Patch.hpp:128
void degRaise()
Raises the degree of the patch by one in both u and v directions.
Definition Patch.cpp:71
int m_DegV
Degree in v direction.
Definition Patch.hpp:122
Patch(const Patch &other)=default
Copy constructor.
Patch(Patch &&other) noexcept=default
Move constructor.
std::vector< std::vector< Point > > m_BBcoefs
Control points of the Bézier patch.
Definition Patch.hpp:136
const std::string m_PatchType
Patch type Please find patch type at https://www.cise.ufl.edu/research/SurfLab/bview/#file-format.
Definition Patch.hpp:111
Patch & operator=(const Patch &other)
Copy assignment operator.
Definition Patch.cpp:143