Navigation Functions

Functions:

MTK_BlockModel_FindWorldXyz

int MTK_BlockModel_FindWorldXyz(
			MTK_BlockModel* bmodel,
			const double& wx,
			const double& wy,
			const double& wz
			);
		

Description

Locate block with world coordinates supplied. Note that this will nullify the current selection.

Parameters

bmodel

pointer to an MTK_BlockModel struct

wx

world x coordinate (double)

wy

world y coordinate (double)

wz

world z coordinate (double)

Return Value

1

block not found

0

success

-1

failure

MTK_BlockModel_FindXyz

int MTK_BlockModel_FindXyz(
			MTK_BlockModel* bmodel,
			const double& mx,
			const double& my,
			const double& mz
			);
		

Description

Locate block with block coordinates supplied. Note that this will nullify the current selection.

Parameters

bmodel

pointer to an MTK_BlockModel struct

mx

model x coordinate (double)

my

model y coordinate (double)

mz

model z coordinate (double)

Return Value

1

located

0

not found

-1

failed

MTK_BlockModel_FirstBlock

int MTK_BlockModel_FirstBlock(MTK_BlockModel* bmodel);
		

Description

Position at first block

Parameters

bmodel

pointer to an MTK_BlockModel struct

Return Value

0

success

other

failure

MTK_BlockModel_GetBlockExtent

int MTK_BlockModel_GetBlockExtent(
			MTK_BlockModel* bmodel,
			double* x0, double* y0, double* z0,
			double* x1, double* y1, double* z1
			);
		

Description

Get the block extent in model coordinates.

Parameters

bmodel

pointer to an MTK_BlockModel struct

x0

lower left x coordinate  (double*)

y0

lower left y coordinate  (double*)

z0

lower left z coordinate  (double*)

x1

upper right x coordinate (double*)

y1

upper right y coordinate (double*)

z1

upper right z coordinate (double*)

Return Value

0

success

other

failure

MTK_BlockModel_GetPosition

Int64 MTK_BlockModel_GetPosition(MTK_BlockModel* bmodel);
		

Description

Get current block position.

Parameters

bmodel

pointer to an MTK_BlockModel struct

Return Value

Int64

current block position

-1

failed

MTK_BlockModel_IsEof

int MTK_BlockModel_IsEof(MTK_BlockModel* bmodel);
		

Description

Check if at the end of the file (blockmodel).

Parameters

bmodel

pointer to an MTK_BlockModel struct

Return Value

1

at end of file (blockmodel)

0

not at the end yet

-1

failed

MTK_BlockModel_NBlocks

Int64 MTK_BlockModel_NBlocks(MTK_BlockModel* bmodel);
		

Description

Get the total number of model blocks.

Parameters

bmodel

pointer to an MTK_BlockModel struct

Return Value

Int64

number of model blocks

-1

failed

MTK_BlockModel_NextBlock

int MTK_BlockModel_NextBlock(MTK_BlockModel* bmodel);
		

Description

Position at the next block.

Parameters

bmodel

pointer to an MTK_BlockModel struct

Return Value

0

success

other

failure

MTK_BlockModel_SetPosition

int MTK_BlockModel_SetPosition(MTK_BlockModel* bmodel, const Int64& position);
		

Description

Set the block navigation to the block at the position specified Note that this will nullify the current selection.

Parameters

bmodel

pointer to an MTK_BlockModel struct

position

block position (int)

Return Value

0

success

other

failure