A builder class for constructing Bézier patches from a mesh.
More...
#include <PatchBuilder.hpp>
|
| | PatchBuilder (const MeshType &a_Mesh, std::vector< VertexHandle > a_NBVertexHandles, const Matrix &a_Mask, PatchConstructor *a_PatchConstructor, int a_NumOfPatches) |
| | Constructs a PatchBuilder with the given neighboring vertex handles, mask, patch constructor and number of output bezier patches.
|
| | PatchBuilder (const MeshType &a_Mesh, std::vector< VertexHandle > a_NBVertexHandles, const Matrix &a_Mask, PatchConstructor *a_PatchConstructor, int a_DegU, int a_DegV) |
| | Constructs a PatchBuilder with the given neighboring vertex handles, mask, patch constructor, and degrees.
|
| | PatchBuilder (const PatchBuilder &a_PatchBuilder) |
| | Construct a new Patch Builder object.
|
|
PatchBuilder & | operator= (const PatchBuilder &a_PatchBuilder) |
| | Assignment operator.
|
| std::vector< Patch > | buildPatches (const MeshType &a_Mesh) const |
| | Builds the Bézier patches using the current vertex positions in the given mesh.
|
| std::vector< VertexHandle > | getNeighborVerts () const |
| | Get the Neighbor Verts object that are used to construct the bezier patches for this PnS patch.
|
| Matrix | getMask () const |
| | Get the Mask object. The linear transformation that maps the neighboring vertices to the coefficients of the bezier patches.
|
| const PatchConstructor * | getPatchConstructor () const |
| | Get the PatchConstructor object that created this PatchBuilder.
|
|
void | degRaise () |
| | Raises the degree of the bezier patches by upto degree 3 in each direction. Nothing happens if the degree is already 3 or higher in a direction. The mask is modified to produce patches with a higher degree.
|
| int | numPatches () const |
| | Get the Num Patches object. The number of bezier patches this PnS patch type outputs.
|
|
|
std::vector< VertexHandle > | m_NBVertexHandles |
| | The neighboring vertex handles used to construct the patch.
|
|
Matrix | m_Mask |
| | The mask used to construct the patch.
|
|
PatchConstructor * | m_PatchConstructor |
| | The patch constructor that created this patch builder.
|
|
int | m_NumOfPatches = -1 |
| | The number of bézier patches this PnS patch type outputs.
|
|
int | m_DegU = -1 |
| | The degree in u direction of each bézier patch this PnS patch type outputs.
|
|
int | m_DegV = -1 |
| | The degree in v direction of each bézier patch this PnS patch type outputs.
|
|
|
void | initializeMaskAndNeighborVertices (const MeshType &a_Mesh, std::vector< VertexHandle > a_NBVertexHandles, const Matrix &a_Mask) |
A builder class for constructing Bézier patches from a mesh.
The PatchBuilder class created by a PatchConstructor contains all the information needed to build a Patch. It holds the neighboring vertex handles, the mask for creating the patch. The mask is always with respect to the control points of the original mesh. The stored mask is generated in case of patch builders being collected from mesh after Subdivision. This way the mask is always with respect to the control points of the original mesh. It can be given a mesh with updated vertices to build updated bezier patches for this particular patch type and neighborhood. By keeping track of the control points that affect this PnS patch, upon updates, only the necessary patch builders need to be re-evaluated.
- Note
- The connectivty of the mesh must not change, only the vertex positions.
◆ PatchBuilder() [1/3]
| PatchBuilder::PatchBuilder |
( |
const MeshType & | a_Mesh, |
|
|
std::vector< VertexHandle > | a_NBVertexHandles, |
|
|
const Matrix & | a_Mask, |
|
|
PatchConstructor * | a_PatchConstructor, |
|
|
int | a_NumOfPatches ) |
Constructs a PatchBuilder with the given neighboring vertex handles, mask, patch constructor and number of output bezier patches.
- Parameters
-
| a_Mesh | The mesh to which the vertex handles belong. Used to validate the vertex handles. |
| a_NBVertexHandles | The neighboring vertex handles used to construct the patch. |
| a_Mask | The mask used to construct the patch. |
| a_PatchConstructor | The patch constructor that created this patch builder. |
| a_NumOfPatches | The number of bézier patches this PnS patch type outputs. |
◆ PatchBuilder() [2/3]
| PatchBuilder::PatchBuilder |
( |
const MeshType & | a_Mesh, |
|
|
std::vector< VertexHandle > | a_NBVertexHandles, |
|
|
const Matrix & | a_Mask, |
|
|
PatchConstructor * | a_PatchConstructor, |
|
|
int | a_DegU, |
|
|
int | a_DegV ) |
Constructs a PatchBuilder with the given neighboring vertex handles, mask, patch constructor, and degrees.
- Parameters
-
| a_Mesh | The mesh to which the vertex handles belong. Used to validate the vertex handles. |
| a_NBVertexHandles | The neighboring vertex handles used to construct the patch. |
| a_Mask | The mask used to construct the patch. |
| a_PatchConstructor | The patch constructor that created this patch builder. |
| a_DegU | The degree in u direction of each bézier patch this PnS patch type outputs. |
| a_DegV | The degree in v direction of each bézier patch this PnS patch type outputs. |
◆ PatchBuilder() [3/3]
| PatchBuilder::PatchBuilder |
( |
const PatchBuilder & | a_PatchBuilder | ) |
|
|
inline |
Construct a new Patch Builder object.
- Parameters
-
◆ buildPatches()
| std::vector< Patch > PatchBuilder::buildPatches |
( |
const MeshType & | a_Mesh | ) |
const |
Builds the Bézier patches using the current vertex positions in the given mesh.
- Parameters
-
| a_Mesh | The mesh containing the current vertex positions. |
- Returns
- A vector of constructed Bézier patches.
- Note
- The connectivity of the mesh must not change, only the vertex positions.
◆ getMask()
| Matrix PatchBuilder::getMask |
( |
| ) |
const |
Get the Mask object. The linear transformation that maps the neighboring vertices to the coefficients of the bezier patches.
- Returns
- Matrix
◆ getNeighborVerts()
| std::vector< VertexHandle > PatchBuilder::getNeighborVerts |
( |
| ) |
const |
Get the Neighbor Verts object that are used to construct the bezier patches for this PnS patch.
- Returns
- std::vector<VertexHandle>
◆ getPatchConstructor()
◆ numPatches()
| int PatchBuilder::numPatches |
( |
| ) |
const |
Get the Num Patches object. The number of bezier patches this PnS patch type outputs.
- Returns
- int
The documentation for this class was generated from the following files: