MCPcopy Create free account
hub / github.com/carbonengine/trinity / TriPerlinCurve

Method TriPerlinCurve

trinity/TriSequencer.cpp:413–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411
412
413TriPerlinCurve::TriPerlinCurve( IRoot* lockobj ) :
414 mValue( 0.0f ),
415 mAlpha( 1.1f ),
416 mBeta( 2.0f ),
417 mSpeed( 1.0f ),
418 mScale( 1.0f ),
419 mOffset( 0.0f ),
420 mN( 3 ),
421 mLastUpdated( -1.0 ),
422 mStart( 0 )
423{
424 // time is set automatically so that the algorithm doesn't try to calculate the
425 // curve many years forward (from time 0), resulting in floating point error jitteriness
426 // Downside is that if a client runs without restart for several years, floating point errors occur.
427 // I'll take the risk!
428
429 //mStart = BeOS->GetActualTime();
430 mStartOffset = TriRandInt( (int)10000000000 );
431}
432
433TriPerlinCurve::~TriPerlinCurve()
434{

Callers

nothing calls this directly

Calls 1

TriRandIntFunction · 0.85

Tested by

no test coverage detected