HStreamer

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.

Enumerations

Methods

HStreamer::HStreamer()

Constructs the HStreamer object

HStreamer::~HStreamer()

Destructor. Deletes and frees the memory being used.

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.

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

void HStreamer::LoadFile(char const *filename)

Begins streaming of the file

Parameters

filename: name of the file to stream in.
void HStreamer::Sweeten(HC_KEY key)

Streams the geometry for given HOOPS Segment key.

Parameters

key: HOOPS segment key
void HStreamer::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

Parameters

camera_position: A HPoint object representing camera position

camera_target: A HPoint object representing camera target

camera_up: A HPoint object representing view up vector

field: Two floats representing camera field

projection: camera projection

HStreamFileToolkit *HStreamer::GetStreamFileToolkit()

Returns a pointer to the HStreamToolkit object this streamer is associated with

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
void HStreamer::FreeKeyLodPairList(vlist_s *&plist)

private

void HStreamer::SweetenBatch()

private

void HStreamer::SweetenNext()

private

TK_Status HStreamer::TreeWalker(HC_KEY start_key, BStreamFileToolkit const *tk, int lod_level = -1)

private

TK_Status HStreamer::TreeWalker(HC_KEY start_key, BStreamFileToolkit const *tk, HPoint const &position, HPoint const &target, HPoint const &up, float const field[2], char const *projection, int lod_level = -1)

private

TK_Status HStreamer::Walk(BStreamFileToolkit const *tk, float const *in_matrix, int test_case, int lod_level)

private

TK_Status HStreamer::ParseBuffer(HStreamerTK *tk, HStreamerBuffer *block)

private

TK_Status HStreamer::ParsePauseInfo(HStreamerBuffer *block)

private

void HStreamer::NotifyCondition(unsigned int condition)

private

Variables

HStreamerTK *HStreamer::m_ptk

private

HStreamerTK
HTClient *HStreamer::m_pBufferPollTimer

private

int HStreamer::m_nPauseJump

private

int
vlist_s *HStreamer::m_pDiscardedBlockIds

private

vlist_s
vlist_s *HStreamer::m_pSweetenList

private

vlist_s
vlist_s *HStreamer::m_pPendingSweetenList

private

vlist_s
vhash_s *HStreamer::m_pAlreadySweetenedList

private

vhash_s
vlist_s *HStreamer::m_pUnknownSizeList

private

vlist_s
parse_stage HStreamer::m_ParseStage

private

parse_stage
Pause_Info *HStreamer::m_PauseInfo

private

Pause_Info
HC_KEY HStreamer::m_model_key

private

HC_KEY
HStreamerConditionNoticeFunction HStreamer::m_condition_notice_helper_function

private

HStreamerConditionNoticeFunction
void *HStreamer::m_condition_notice_user_data

private

void
int HStreamer::m_sweeten_end_id

private

int