HStreamer
Functions
void |
|
void |
|
void |
|
void |
|
void |
|
HStreamFileToolkit * |
|
bool |
Detailed Description
-
class HStreamer
The HStreamer class provides functionality for on-demand and view-dependent streaming of HSF files.
HStreamer is a high-level class which encapsulates the details of dealing with the HOOPS/Stream module to achieve on-demand or view-dependent streaming.
Usage: Create an instance to this class. Call function Setup() to initialize it. Use the function LoadFile to load the file for streaming. Now you can call any of it’s high-level functions to sweeten (streaming more) the entities.
Public Functions
-
~HStreamer()
Destructor. Deletes and frees the memory being used.
-
void Setup(HC_KEY model_key, int n_pause = 0)
Initializes the HStreamer object. This function has to be called before you start streaming using the other interfaces of this object.
- Parameters
model_key – A key to HOOPS segment where the streamed data is to be inserted
net_client – A pointer to the HNetClient object which is associated with the directory on the server. This directory has the file which is requested for streaming. If not provided streamer is for local files only.
n_pause – number of pauses (TK_Pause marker) in the HSF file to read to when the file is first loaded. Setting to 0 will read the complete file. 1 reads the segment structure and 2 reads the simplified geometry.
-
void SetConditionNoticeFunction(HStreamerConditionNoticeFunction condition_notice_helper_function, void *user_data)
Sets up a callback function to provide condition and error notices.
- Parameters
condition_notice_helper_function – A pointer to function which will receive the notices and error
user_data – A void pointer to the pass through data you might be interested in receiving with the notices
-
void LoadFile(char const *filename)
Begins streaming of the file
- Parameters
filename – name of the file to stream in.
-
void Sweeten(HC_KEY key)
Streams the geometry for given HOOPS Segment key.
- Parameters
key – HOOPS segment key
-
void Sweeten(HPoint const &camera_position, HPoint const &camera_target, HPoint const &camera_up, float const field[2], char const *projection)
Streams the geometry which falls within the view of given camera position
-
inline HStreamFileToolkit *GetStreamFileToolkit()
Returns a pointer to the HStreamToolkit object this streamer is associated with
-
bool ReadStreamBufferQue()
Called by the MVO timer to poll the buffer que for reading
- Returns
false if the timer is required to be stopped
-
~HStreamer()