Core 1.0
|
Bézier patches of dimension n<16. More...
#include <bezier.h>
Public Member Functions | |
BezierPatch () | |
Empty. | |
BezierPatch (int, int) | |
Create a Bézier patch. | |
BezierPatch (const QVector< Vector > &, int, int) | |
Create a Bézier patch. | |
virtual Vector | Vertex (const double &, const double &) const |
Compute a point on the patch. | |
virtual Vector | Normal (const double &, const double &) const |
Compute the normal at a given point on the patch. | |
virtual void | Tangents (const double &, const double &, Vector &, Vector &) const |
Compute the partial derivatives at a given point on the patch. | |
Vector | Vertex (int, int) const |
Return the control point. | |
Vector | operator() (int, int) const |
Return the control point. | |
Box | GetBox () const |
Compute the bouding box. | |
Mesh | GetMesh (int, int) const |
Create the mesh of the patch. | |
void | Rotate (const Matrix &) |
Rotates a patch. | |
void | Translate (const Vector &) |
Translation. | |
void | Scale (const Vector &) |
Scale. | |
Protected Member Functions | |
constexpr int | Index (int, int) const |
Compute the linear index of a control point. | |
Protected Attributes | |
QVector< Vector > | c |
Array of control points. | |
int | ny = 0 |
Array size. | |
Bézier patches of dimension n<16.
|
explicit |
Create a Bézier patch.
All control points are set to Vector::Null.
nx,ny | Number of control points. |
|
explicit |
Create a Bézier patch.
c | Set of control points. |
nx,ny | Number of control points. |
Mesh BezierPatch::GetMesh | ( | int | nu, |
int | nv ) const |
Create the mesh of the patch.
nu,nv | Subdivisons. |
|
inlineconstexprprotected |
Compute the linear index of a control point.
i,j | Control point indexes. |
|
virtual |
Compute the normal at a given point on the patch.
u,v | Coordinates. |
Reimplemented in BezierCubicPatch.
Vector BezierPatch::operator() | ( | int | i, |
int | j ) const |
Return the control point.
i,j | Indexes. |
void BezierPatch::Rotate | ( | const Matrix & | r | ) |
Rotates a patch.
r | Rotation matrix. |
void BezierPatch::Scale | ( | const Vector & | s | ) |
Scale.
s | Scaling vector. |
|
virtual |
Compute the partial derivatives at a given point on the patch.
u,v | Coordinates. |
tu,tv | Tangent vectors, not normalized. |
void BezierPatch::Translate | ( | const Vector & | t | ) |
Translation.
t | Translation vector. |
|
virtual |
Vector BezierPatch::Vertex | ( | int | i, |
int | j ) const |
Return the control point.
i,j | Indexes. |