Easy3D 2.6.1
Loading...
Searching...
No Matches
Curve< Point, N, T > Class Template Referenceabstract

Abstract base class for curve fitting/interpolation. More...

#include <easy3d/core/curve.h>

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

Public Types

using Point_t = Point<N, T>
 The type of points.
 

Public Member Functions

virtual std::vector< Point_tgenerate (const std::vector< Point_t > &control_points, size_t num_samples) const =0
 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::Curve< Point, N, T >

Abstract base class for curve fitting/interpolation.

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).
See also
Bezier, BSpline, and CatmullRom

Member Function Documentation

◆ generate()

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

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.

Implemented in Bezier< Point, N, T >, BSpline< Point, N, T >, and CatmullRom< Point, N, T >.


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