Polyhedral-net Splines
Loading...
Searching...
No Matches
Patch Struct Reference

A class representing a Bézier patch. More...

#include <Patch.hpp>

Public Member Functions

 Patch ()
 Construct a new Patch object.
 Patch (int a_BiDeg)
 Construct a new Patch object.
 Patch (int a_BiDeg, std::string a_Group)
 Construct a new Patch object.
 Patch (int a_DegU, int a_DegV)
 Construct a new Patch object.
 Patch (int a_DegU, int a_DegV, std::string a_Group)
 Construct a new Patch object.
 Patch (const Patch &other)=default
 Copy constructor.
 Patch (Patch &&other) noexcept=default
 Move constructor.
Patchoperator= (const Patch &other)
 Copy assignment operator.
Patchoperator= (Patch &&other) noexcept
 Move assignment operator.
bool isValid () const
 Checks if a patch is valid.
void initBBcoefs ()
 intializes the control points array based on the degrees.
void degRaise ()
 Raises the degree of the patch by one in both u and v directions.

Public Attributes

const std::string m_PatchType = "5"
 Patch type Please find patch type at https://www.cise.ufl.edu/research/SurfLab/bview/#file-format.
int m_DegU
 Degree in u direction.
int m_DegV
 Degree in v direction.
std::string m_Group = "Group 0 default"
 Group name associated with the patch.
std::vector< std::vector< Point > > m_BBcoefs
 Control points of the Bézier patch.

Detailed Description

A class representing a Bézier patch.

The Patch class encapsulates the properties and control points of a Bézier patch. It includes methods for initialization, validation, and degree elevation.

Constructor & Destructor Documentation

◆ Patch() [1/6]

Patch::Patch ( int a_BiDeg)

Construct a new Patch object.

Parameters
a_BiDegThe bi-degree of the patch (same in both u and v directions).

◆ Patch() [2/6]

Patch::Patch ( int a_BiDeg,
std::string a_Group )

Construct a new Patch object.

Parameters
a_BiDegThe bi-degree of the patch (same in both u and v directions).
a_GroupThe group name associated with the patch.

◆ Patch() [3/6]

Patch::Patch ( int a_DegU,
int a_DegV )

Construct a new Patch object.

Parameters
a_DegUThe degree of the patch in the u direction.
a_DegVThe degree of the patch in the v direction.

◆ Patch() [4/6]

Patch::Patch ( int a_DegU,
int a_DegV,
std::string a_Group )

Construct a new Patch object.

Parameters
a_DegUThe degree of the patch in the u direction.
a_DegVThe degree of the patch in the v direction.
a_GroupThe group name associated with the patch.

◆ Patch() [5/6]

Patch::Patch ( const Patch & other)
default

Copy constructor.

Parameters
otherThe Patch object to copy from.

◆ Patch() [6/6]

Patch::Patch ( Patch && other)
defaultnoexcept

Move constructor.

Parameters
otherThe Patch object to move from.

Member Function Documentation

◆ degRaise()

void Patch::degRaise ( )

Raises the degree of the patch by one in both u and v directions.

This method modifies the control points to reflect the degree elevation.

◆ isValid()

bool Patch::isValid ( ) const

Checks if a patch is valid.

Returns
true if the patch is valid, false otherwise.

◆ operator=() [1/2]

Patch & Patch::operator= ( const Patch & other)

Copy assignment operator.

Parameters
other
Returns
Patch&

◆ operator=() [2/2]

Patch & Patch::operator= ( Patch && other)
noexcept

Move assignment operator.

Parameters
other
Returns
Patch&

Member Data Documentation

◆ m_BBcoefs

std::vector<std::vector<Point> > Patch::m_BBcoefs

Control points of the Bézier patch.

This is a 2D vector where each element represents a control point in 3D space. The size of the outer vector is (m_DegU + 1) and the size of the inner vectors is (m_DegV + 1).


The documentation for this struct was generated from the following files: