class tsData1RFloatFile : public tsData1RFloat

Node storing a regular sampled float signal beeing read from file

Inheritance:


Public Methods

SoINTERNAL static void initClass()
Makes this class known to the OpenInventor type system.
int readFile(const SbString file)
Reads in file content. Called on first traversal.

Public

Action behaviour:
virtual void doAction(SoAction *action)
does default action behaviour. Sets signal data in tsData1Element.
virtual void GLRender(SoGLRenderAction *action)
does GLrender begaviour, calls doAction()
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
calls doAction()
virtual void callback(SoCallbackAction *action)
calls doAction()
virtual void pick(SoPickAction *action)
calls doAction()
New Fields
SoSFString filename
Field containing the filename of the file to be read in

Protected Fields

SbBool _fileReadOrError
Flag to remember, if reading the file has been tried without success.

Protected Methods

int _readFileAudio(const char* file)
returnes TRUE, if reading an audio file was succesfull.
int _readFileMatlab(const SbString file)
returnes TRUE, if reading an audio file was succesfull. Not yet implemented!
virtual ~tsData1RFloatFile()
Destructor

Private Methods

SO_NODE_HEADER(tsData1RFloatFile)

Inherited from tsData1RFloat:

Public

Common data access methods:

virtual SoType getRealClassTypeId()
virtual int getNum()
returns number points sampled in time
virtual int getNumValues()
returns total number points sampled in all dimensions.
virtual float getTime(int index)
returns time when data a t<index> is sampled
virtual const float getTimeMin()
returns time of first sample point
virtual const float getTimeMax()
returns time of last sample point
virtual int getIndex(float time, int startIndex = 0)
returns index of a point in time. Starts search from startIndex (optional)
virtual const void* getValue(int index)
returnes a value as a pointer!
virtual void getValueMinMax( float& min, float& max)
virtual SbBool isRegularSampled()
returns TRUE because data is regular sampled.

Inherited from tsData1Base:

Private Methods

SO_NODE_ABSTRACT_HEADER(tsData1Base)

Inherited from tsDataBase:

Public Fields

SoSFNode node

Documentation

Node storing a regular sampled float signal beeing read from file. If field <filename> is not empty, file with filename taken from field <filename> is read in on construction time (better on first traversal! Future work). Otherwise it habits exactly like its parent class tsData1RFloat. Node's signal data in field <data> is NOT saved when scene graph is written to a file, until field is touched once! Field content is assumed to be the dafault value for this field. Touching this field, deletes his default status and makes it beeing written as a normal Inventor node.

The following file formats are detected:

Audio files currently recognized by the SGI audiofile library. If field <interval> is not empty (default), the file is resampled to this sample frequency. To big changes in frequency produce error messages from the audiofile library, doing the resampling, but can be ignored.

Future work: Matlab ASCII files representing a one dimensional vector of values (converted to float).

SO_NODE_HEADER(tsData1RFloatFile)

New Fields

SoSFString filename
Field containing the filename of the file to be read in. Changes are not yet recognized. Reading is done only once! (future work!).

Action behaviour:

virtual void doAction(SoAction *action)
does default action behaviour. Sets signal data in tsData1Element.

virtual void GLRender(SoGLRenderAction *action)
does GLrender begaviour, calls doAction()

virtual void getBoundingBox(SoGetBoundingBoxAction *action)
calls doAction()

virtual void callback(SoCallbackAction *action)
calls doAction()

virtual void pick(SoPickAction *action)
calls doAction()

SoINTERNAL static void initClass()
Makes this class known to the OpenInventor type system.

int readFile(const SbString file)
Reads in file content. Called on first traversal.

int _readFileAudio(const char* file)
returnes TRUE, if reading an audio file was succesfull.

int _readFileMatlab(const SbString file)
returnes TRUE, if reading an audio file was succesfull. Not yet implemented!

SbBool _fileReadOrError
Flag to remember, if reading the file has been tried without success.

virtual ~tsData1RFloatFile()
Destructor


This class has no child classes.
Author:
(c) Andreas Lücke
Version:
0.0
See Also:
tsLine tsData1RFloat tsData2RNFloatFile

alphabetic index hierarchy of classes


This page is part of the tsKit's reference manual by Andreas Lücke.
Back to tsKit-Home

generated by doc++