The HStreamer class provides functionality for on-demand and view-dependent streaming of HSF files. More...
#include <HStreamer.h>
Public Member Functions | |
HStreamFileToolkit * | GetStreamFileToolkit () |
HStreamer () | |
void | LoadFile (const char *filename) |
bool | ReadStreamBufferQue () |
void | SetConditionNoticeFunction (HStreamerConditionNoticeFunction condition_notice_helper_function, void *user_data) |
void | Setup (HC_KEY model_key, int n_pause=0) |
void | Sweeten (HC_KEY key) |
void | Sweeten (const HPoint &camera_position, const HPoint &camera_target, const HPoint &camera_up, const float field[2], const char *projection) |
~HStreamer () | |
Friends | |
class | HTK_HStreamer_Shell |
Detailed Description
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.
Constructor & Destructor Documentation
◆ HStreamer()
HStreamer::HStreamer | ( | ) |
Constructs the HStreamer object
◆ ~HStreamer()
HStreamer::~HStreamer | ( | ) |
Destructor. Deletes and frees the memory being used.
Member Function Documentation
◆ GetStreamFileToolkit()
|
inline |
Returns a pointer to the HStreamToolkit object this streamer is associated with
◆ LoadFile()
void HStreamer::LoadFile | ( | const char * | filename | ) |
Begins streaming of the file
- Parameters
-
filename name of the file to stream in.
◆ ReadStreamBufferQue()
bool HStreamer::ReadStreamBufferQue | ( | ) |
Called by the MVO timer to poll the buffer que for reading
- Returns
- false if the timer is required to be stopped
◆ SetConditionNoticeFunction()
void HStreamer::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
◆ Setup()
void HStreamer::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.
◆ Sweeten() [1/2]
void HStreamer::Sweeten | ( | HC_KEY | key | ) |
Streams the geometry for given HOOPS Segment key.
- Parameters
-
key HOOPS segment key
◆ Sweeten() [2/2]
void HStreamer::Sweeten | ( | const HPoint & | camera_position, |
const HPoint & | camera_target, | ||
const HPoint & | camera_up, | ||
const float | field[2], | ||
const char * | projection | ||
) |
Streams the geometry which falls within the view of given camera position
The documentation for this class was generated from the following file: