FloatVecData(int len);This form creates an uninitialized array of length
len
in the FloatVecData object. Since the pointer to the data is public the array may easily be filled in.
FloatVecData(int len,const float *srcData);This form creates an array of length
len
and initializes it with len
elements from srcData.
FloatVecData(int len,const double *srcData);This form is the same, except that the source data is double precision (it is converted to single precision). This is the only function for which an analogous function does not exist in IntVecData (an IntVecData can only be initialized from an integer array). An appropriate copy constructor, assignment operator, and destructor are defined.
int length() const;Return the length of the array.
float *data;Public data member; points to the array. It is permissible to read or assign the
len
elements starting at data;
the effect of altering the data
pointer itself is undefined.
const char* dataType() const;Returns the string
"FloatVecData".
int isA(const char* type) const;TRUE for
type
equal to "FloatVecData",
otherwise false.
StringList print() const;Returns a comma-separated list of elements enclosed in curly braces.
Message* clone() const;Creates an identical copy with
new.