Core 1.0
BezierCubicPatch Class Reference

Cubic Bézier patches. More...

#include <bezier.h>

Inheritance diagram for BezierCubicPatch:
BezierPatch

Public Member Functions

 BezierCubicPatch ()
 Empty.
 
 BezierCubicPatch (const QVector< Vector > &)
 Create a Bézier patch.
 
 BezierCubicPatch (const Vector[16])
 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.
 
Vector Vertex (int, int) const
 Return the control point.
 
Vector operator() (int, int) const
 Return the control point.
 
- Public Member Functions inherited from BezierPatch
 BezierPatch ()
 Empty.
 
 BezierPatch (int, int)
 Create a Bézier patch.
 
 BezierPatch (const QVector< Vector > &, int, int)
 Create a Bézier 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 Member Functions inherited from BezierPatch
constexpr int Index (int, int) const
 Compute the linear index of a control point.
 

Additional Inherited Members

- Protected Attributes inherited from BezierPatch
QVector< Vectorc
 Array of control points.
 
int ny = 0
 Array size.
 

Detailed Description

Cubic Bézier patches.

Constructor & Destructor Documentation

◆ BezierCubicPatch() [1/2]

BezierCubicPatch::BezierCubicPatch ( const QVector< Vector > & c)
explicit

Create a Bézier patch.

Parameters
cSet of 4×4control points.

◆ BezierCubicPatch() [2/2]

BezierCubicPatch::BezierCubicPatch ( const Vector c[16])
explicit

Create a Bézier patch.

Parameters
cArray of 4×4 control points.

Member Function Documentation

◆ Index()

int BezierCubicPatch::Index ( int i,
int j ) const
inlineconstexprprotected

Compute the linear index of a control point.

Parameters
i,jControl point indexes.

◆ Normal()

Vector BezierCubicPatch::Normal ( const double & u,
const double & v ) const
virtual

Compute the normal at a given point on the patch.

Parameters
u,vCoordinates.

Reimplemented from BezierPatch.

◆ operator()()

Vector BezierCubicPatch::operator() ( int i,
int j ) const

Return the control point.

Parameters
i,jIndexes.

◆ Vertex() [1/2]

Vector BezierCubicPatch::Vertex ( const double & u,
const double & v ) const
virtual

Compute a point on the patch.

Parameters
u,vCoordinates.

Reimplemented from BezierPatch.

◆ Vertex() [2/2]

Vector BezierCubicPatch::Vertex ( int i,
int j ) const

Return the control point.

Parameters
i,jIndexes.