Unravel Engine C++ Reference
Loading...
Searching...
No Matches
math::gradient< T > Class Template Reference

#include <gradient.h>

Public Types

using point_t = gradient_point<T>
 
using points_t = std::vector<point_t>
 

Public Member Functions

auto add_point (const T &element, float progress) -> size_t
 
void remove_point (int index)
 
void set_points (const points_t &points)
 
auto get_points () const noexcept -> const points_t &
 
void set_progress (int index, float progress)
 
auto get_progress (int index) -> float
 
void set_element (int index, const T &element)
 
auto get_element (int index) -> T
 
void reverse ()
 
auto is_valid () const noexcept -> bool
 
auto sample (float progress) const -> T
 
void set_interpolation_mode (gradient_interpolation_mode_t mode)
 
auto get_interpolation_mode () const noexcept -> gradient_interpolation_mode_t
 
void generate_lut (size_t lut_size=256)
 
void clear_lut ()
 
bool has_lut () const noexcept
 
auto operator== (const gradient< T > &other) const -> bool
 

Detailed Description

template<typename T>
class math::gradient< T >

Definition at line 48 of file gradient.h.

Member Typedef Documentation

◆ point_t

template<typename T >
using math::gradient< T >::point_t = gradient_point<T>

Definition at line 51 of file gradient.h.

◆ points_t

template<typename T >
using math::gradient< T >::points_t = std::vector<point_t>

Definition at line 52 of file gradient.h.

Member Function Documentation

◆ add_point()

template<typename T >
auto math::gradient< T >::add_point ( const T & element,
float progress ) -> size_t

Definition at line 8 of file gradient.hpp.

◆ clear_lut()

template<typename T >
void math::gradient< T >::clear_lut ( )

Definition at line 238 of file gradient.hpp.

◆ generate_lut()

template<typename T >
void math::gradient< T >::generate_lut ( size_t lut_size = 256)

Definition at line 222 of file gradient.hpp.

◆ get_element()

template<typename T >
auto math::gradient< T >::get_element ( int index) -> T

Definition at line 98 of file gradient.hpp.

◆ get_interpolation_mode()

template<typename T >
auto math::gradient< T >::get_interpolation_mode ( ) const -> gradient_interpolation_mode_t
noexcept

Definition at line 204 of file gradient.hpp.

◆ get_points()

template<typename T >
auto math::gradient< T >::get_points ( ) const -> const points_t&
noexcept

Definition at line 45 of file gradient.hpp.

◆ get_progress()

template<typename T >
auto math::gradient< T >::get_progress ( int index) -> float

Definition at line 75 of file gradient.hpp.

◆ has_lut()

template<typename T >
bool math::gradient< T >::has_lut ( ) const
inlinenoexcept

Definition at line 77 of file gradient.h.

◆ is_valid()

template<typename T >
auto math::gradient< T >::is_valid ( ) const -> bool
noexcept

Definition at line 109 of file gradient.hpp.

◆ operator==()

template<typename T >
auto math::gradient< T >::operator== ( const gradient< T > & other) const -> bool

Definition at line 210 of file gradient.hpp.

◆ remove_point()

template<typename T >
void math::gradient< T >::remove_point ( int index)

Definition at line 24 of file gradient.hpp.

◆ reverse()

template<typename T >
void math::gradient< T >::reverse ( )

Definition at line 51 of file gradient.hpp.

◆ sample()

template<typename T >
auto math::gradient< T >::sample ( float progress) const -> T

Definition at line 115 of file gradient.hpp.

◆ set_element()

template<typename T >
void math::gradient< T >::set_element ( int index,
const T & element )

Definition at line 86 of file gradient.hpp.

◆ set_interpolation_mode()

template<typename T >
void math::gradient< T >::set_interpolation_mode ( gradient_interpolation_mode_t mode)

Definition at line 197 of file gradient.hpp.

◆ set_points()

template<typename T >
void math::gradient< T >::set_points ( const points_t & points)

Definition at line 37 of file gradient.hpp.

◆ set_progress()

template<typename T >
void math::gradient< T >::set_progress ( int index,
float progress )

Definition at line 62 of file gradient.hpp.


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