Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::util::CurvePoint< V, P > Struct Template Reference

Point on a curve, also called a keyframe in some contexts. More...

#include <OxygenEngine/util/curve.h>

+ Collaboration diagram for oe::util::CurvePoint< V, P >:

Public Member Functions

constexpr auto operator<=> (const CurvePoint &other) const
 Three-way comparison operator.
 

Static Public Member Functions

static constexpr V interpolate (const CurvePoint &begin_point, const CurvePoint &end_point, const P ratio) noexcept
 Interpolate Value between two points.
 

Public Attributes

position
 Position of this point on the curve.
 
value
 Value of this point.
 
CurveInterpolation interpolation
 How to interpolate between last point and this point.
 

Detailed Description

template<CurveValueConcept V, CurvePositionConcept P = float>
struct oe::util::CurvePoint< V, P >

Point on a curve, also called a keyframe in some contexts.

Member Function Documentation

◆ interpolate()

template<CurveValueConcept V, CurvePositionConcept P = float>
static constexpr V oe::util::CurvePoint< V, P >::interpolate ( const CurvePoint< V, P > &  begin_point,
const CurvePoint< V, P > &  end_point,
const P  ratio 
)
inlinestaticconstexprnoexcept

Interpolate Value between two points.

Parameters
begin_pointPoint to take value if the ratio is 0.0f
end_pointPoint to take value if the ratio is 1.0f
ratioInterpolation ratio
Returns
Interpolated value

◆ operator<=>()

template<CurveValueConcept V, CurvePositionConcept P = float>
constexpr auto oe::util::CurvePoint< V, P >::operator<=> ( const CurvePoint< V, P > &  other) const
inlineconstexpr

Three-way comparison operator.

For comparison, only take the position into account

Parameters
otherPoint to compare
Returns
Three-way comparison between point positions

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