Easy3D 2.6.1
Loading...
Searching...
No Matches
Bezier< Point, N, T > Class Template Reference

Class for Bezier curve fitting. More...

#include <easy3d/core/curve.h>

Inheritance diagram for Bezier< Point, N, T >:
Curve< Point, N, T >

Public Types

using Point_t = Point<N, T>
 The type of points.
 
- Public Types inherited from Curve< Point, N, T >
using Point_t = Point<N, T>
 The type of points.
 

Public Member Functions

 Bezier ()=default
 Default constructor.
 
std::vector< Point_tgenerate (const std::vector< Point_t > &control_points, size_t num_samples) const override
 Generates a curve based on the given control points.
 

Detailed Description

template<template< size_t, class > class Point, size_t N, typename T>
class easy3d::Bezier< Point, N, T >

Class for Bezier curve fitting.

Template Parameters
PointA templated point class that supports basic arithmetic operations (addition and scalar multiplication). It must be parameterized as Point<N, T>, where N is the number of dimensions, and T is the data type.
NThe number of dimensions (e.g., 2 for 2D, 3 for 3D).
TThe scalar type (e.g., float or double).

Example:

const auto points = curve.generate(control_points, 100);
Bezier()=default
Default constructor.
Algorithms for evaluating curves.
Examples
Tutorial_603_Curves/main.cpp.

Member Function Documentation

◆ generate()

template<template< size_t, class > class Point, size_t N, typename T>
std::vector< Point_t > generate ( const std::vector< Point_t > & control_points,
size_t num_samples ) const
inlineoverridevirtual

Generates a curve based on the given control points.

Parameters
control_pointsA vector of control points that define the curve.
num_samplesThe number of samples to generate along the curve.
Returns
A vector of points representing the generated curve.

Implements Curve< Point, N, T >.


The documentation for this class was generated from the following file: