Blaze.CurveSampler Class Reference

Detailed Description

A curve sampler. Steps along a curve (along x, reading y) at regular values. X ranges from 0-1.

Inheritance diagram for Blaze.CurveSampler:
Blaze.MappedShapeSampler

Public Member Functions

 CurveSampler (VectorPath path)
 
void Goto (float t, bool readValue)
 Goes to a particular t value. Note that t should usually be bigger than the previous Goto request (backward seeking isn't super efficient). More...
 
float[] Bake (int size)
 Bakes this curve into a set of values of the given size. More...
 
void Bake (float[] data)
 Bakes this curve into a set of values. More...
 
void Reset ()
 Resets the stepping through this sampler. More...
 
virtual void Advance (float by, bool readValue)
 Advances this sampler by the given amount. More...
 

Public Attributes

VectorPath Path
 
VectorPoint Current
 The current point we're at whilst stepping through this sampler. More...
 
float DistanceStepped
 The distance stepped since a reset. More...
 
float CurrentValue
 The current value of this sampler. Must have been advancing it for this to be available. More...
 
- Public Attributes inherited from Blaze.MappedShapeSampler
float DeltaOne
 Cached delta values used for faster sampling. More...
 
float DeltaTwo
 Cached delta values used for faster sampling. More...
 
float DeltaThree
 Cached delta values used for faster sampling. More...
 

Constructor & Destructor Documentation

Blaze.CurveSampler.CurveSampler ( VectorPath  path)
inline

Member Function Documentation

virtual void Blaze.CurveSampler.Advance ( float  by,
bool  readValue 
)
inlinevirtual

Advances this sampler by the given amount.

float [] Blaze.CurveSampler.Bake ( int  size)
inline

Bakes this curve into a set of values of the given size.

void Blaze.CurveSampler.Bake ( float[]  data)
inline

Bakes this curve into a set of values.

void Blaze.CurveSampler.Goto ( float  t,
bool  readValue 
)
inline

Goes to a particular t value. Note that t should usually be bigger than the previous Goto request (backward seeking isn't super efficient).

void Blaze.CurveSampler.Reset ( )
inline

Resets the stepping through this sampler.

Member Data Documentation

VectorPoint Blaze.CurveSampler.Current

The current point we're at whilst stepping through this sampler.

float Blaze.CurveSampler.CurrentValue

The current value of this sampler. Must have been advancing it for this to be available.

float Blaze.CurveSampler.DistanceStepped

The distance stepped since a reset.

VectorPath Blaze.CurveSampler.Path