Nebula
Loading...
Searching...
No Matches
Particles::EnvelopeSampleBuffer Class Reference

#include <envelopesamplebuffer.h>

Detailed Description

A lookup table for pre-sampled envelope curves.

Public Member Functions

 EnvelopeSampleBuffer ()
 constructor
 
 ~EnvelopeSampleBuffer ()
 destructor
 
void Setup (const EmitterAttrs &emitterAttrs, SizeT numSamples)
 setup the sample buffer
 
void Discard ()
 discard the sample buffer
 
bool IsValid () const
 return true if object has been setup
 
IndexT AsSampleIndex (float t) const
 convert t-value (0.0 to 1.0) into a lookup index
 
float * LookupSamples (IndexT sampleIndex) const
 get pointer to samples, index into array by EmitterAttrs::EnvelopeAttr
 
SizeT GetNumSamples () const
 get the number of samples per attribute
 
const float * GetSampleBuffer () const
 get the sample buffer
 

Private Attributes

SizeT numSamples
 
float * buffer
 

Constructor & Destructor Documentation

◆ EnvelopeSampleBuffer()

Particles::EnvelopeSampleBuffer::EnvelopeSampleBuffer ( )

constructor

◆ ~EnvelopeSampleBuffer()

Particles::EnvelopeSampleBuffer::~EnvelopeSampleBuffer ( )

destructor

Member Function Documentation

◆ AsSampleIndex()

IndexT Particles::EnvelopeSampleBuffer::AsSampleIndex ( float t) const
inline

convert t-value (0.0 to 1.0) into a lookup index

◆ Discard()

void Particles::EnvelopeSampleBuffer::Discard ( )

discard the sample buffer

◆ GetNumSamples()

SizeT Particles::EnvelopeSampleBuffer::GetNumSamples ( ) const
inline

get the number of samples per attribute

◆ GetSampleBuffer()

const float * Particles::EnvelopeSampleBuffer::GetSampleBuffer ( ) const
inline

get the sample buffer

◆ IsValid()

bool Particles::EnvelopeSampleBuffer::IsValid ( ) const
inline

return true if object has been setup

◆ LookupSamples()

float * Particles::EnvelopeSampleBuffer::LookupSamples ( IndexT sampleIndex) const
inline

get pointer to samples, index into array by EmitterAttrs::EnvelopeAttr

◆ Setup()

void Particles::EnvelopeSampleBuffer::Setup ( const EmitterAttrs & emitterAttrs,
SizeT numSamples )

setup the sample buffer

Member Data Documentation

◆ buffer

float* Particles::EnvelopeSampleBuffer::buffer
private

◆ numSamples

SizeT Particles::EnvelopeSampleBuffer::numSamples
private

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