HStreamer Class Reference

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()

HStreamFileToolkit* HStreamer::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
filenamename 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_functionA pointer to function which will receive the notices and error
user_dataA 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_keyA key to HOOPS segment where the streamed data is to be inserted
net_clientA 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_pausenumber 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
keyHOOPS 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

Parameters
camera_positionA HPoint object representing camera position
camera_targetA HPoint object representing camera target
camera_upA HPoint object representing view up vector
fieldTwo floats representing camera field
projectioncamera projection

The documentation for this class was generated from the following file: