classhsNoiseFunc:publichsRefCnt// should inherit from keyed object
{
public:
hsNoiseFunc();
virtual~hsNoiseFunc();
virtualvoidSeed(UInt32s);
virtualhsScalarNoise(hsScalarlo=0,hsScalarhi=hsScalar1,hsScalart=0)=0;// t = [0..1] - returns random num [lo..hi] scaled by fTable[t]
virtualhsScalarNoisePoint(consthsPoint3&p,hsScalarlo=0,hsScalarhi=hsScalar1,hsScalart=0)=0;// t = [0..1] - returns random num [lo..hi] scaled by fTable[t]
};
classhsTableNoise:publichsNoiseFunc// should inherit from keyed object
{
protected:
hsScalar*fTable;
UInt32fTableLen;
public:
hsTableNoise();
virtual~hsTableNoise();
voidSetTable(intlen,hsScalar*arr);// copies. arr should be hsScalars in range [0..1]
hsScalar*GetTable(int&len){len=fTableLen;returnfTable;}// should be debug only, access through noise func
virtualhsScalarNoise(hsScalarlo=0,hsScalarhi=hsScalar1,hsScalart=0);// t = [0..1] - returns random num [lo..hi] scaled by fTable[t]
virtualhsScalarNoisePoint(consthsPoint3&p,hsScalarlo=0,hsScalarhi=hsScalar1,hsScalart=0);// t = [0..1] - returns random num [lo..hi] scaled by fTable[t]