JPL Spatial
Sound spatialization and propagation library
Loading...
Searching...
No Matches
JPL::AttenuationCurve Struct Reference

#include <JPLSpatial/DistanceAttenuation.h>

Inheritance diagram for JPL::AttenuationCurve:
JPL::AttenuationFunction

Classes

struct  Point
 

Public Member Functions

JPL_INLINE void SortPoints ()
 Sort curve points by distance. This should be called after changing Points.
 
JPL_INLINE float Evaluate (float distance) const final
 Evaluate curve at distance
 
- Public Member Functions inherited from JPL::AttenuationFunction
virtual ~AttenuationFunction ()=default
 

Public Attributes

std::pmr::vector< PointPoints { GetDefaultMemoryResource() }
 Curve points that should sorted by distance.
 

Detailed Description

Attenuation curve constructed from a set of points, each point can have a different function used to evaluate the following segment of the curve, up to the next point.

Member Function Documentation

◆ Evaluate()

JPL_INLINE float JPL::AttenuationCurve::Evaluate ( float  distance) const
finalvirtual

Evaluate curve at distance

Implements JPL::AttenuationFunction.

◆ SortPoints()

JPL_INLINE void JPL::AttenuationCurve::SortPoints ( )
inline

Sort curve points by distance. This should be called after changing Points.

Member Data Documentation

◆ Points

std::pmr::vector<Point> JPL::AttenuationCurve::Points { GetDefaultMemoryResource() }

Curve points that should sorted by distance.


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