|
| | Stop ()=default |
| | Default constructor.
|
| |
| | Stop (float position, T value) |
| | Constructs a stop with specified position and value.
|
| |
| bool | operator== (const Stop< T > &other) const |
| | Equality comparison operator.
|
| |
| bool | operator!= (const Stop< T > &other) const |
| | Inequality comparison operator.
|
| |
| bool | operator< (const Stop< T > &other) const |
| | Less-than comparison operator based on position.
|
| |
| bool | operator> (const Stop< T > &other) const |
| | Greater-than comparison operator based on position.
|
| |
| bool | operator<= (const Stop< T > &other) const |
| | Less-than-or-equal comparison operator based on position.
|
| |
| bool | operator>= (const Stop< T > &other) const |
| | Greater-than-or-equal comparison operator based on position.
|
| |
template<typename T>
struct Infinity::Types::Math::Stop< T >
Represents a control point in a gradient or interpolation ramp.
Stop defines a single control point along a one-dimensional parameter space, associating a position (typically in the range [0, 1]) with a value of any type. Stops are the fundamental building blocks of Ramp objects, which provide smooth interpolation between values across a parameter range.
Common use cases in procedural generation:
- Color gradients for textures and materials
- Height curves for terrain generation
- Animation curves and easing functions
- Parameter transitions in procedural effects
- Falloff curves for blending operations
- Density distributions for particle systems
Stops can hold any type of value (floats, vectors, colors, etc.) and are typically sorted by position when used in a Ramp. The comparison operators are provided to facilitate sorting by position.
Example usage:
std::vector<ValueStop> stops = {end, start, middle};
std::sort(stops.begin(), stops.end());
float height = heightCurve.evaluate(0.5f);
Interpolated gradient for smoothly transitioning between values.
Definition Ramp.hpp:90
Stop< float > ValueStop
Alias for Stop<float>, a scalar gradient control point.
Definition Stop.hpp:196
t_Vector3< float > Vector3
Alias for t_Vector3<float>, the default 3D vector type.
Definition Vector3.hpp:580
Represents a control point in a gradient or interpolation ramp.
Definition Stop.hpp:64
- Template Parameters
-
| T | The type of value stored at this stop (e.g., float, Vector3, Vector4). |
- See also
- Ramp
-
ValueStop, Value2Stop, Value3Stop, Value4Stop