3DText Functions

Functions:

MTK_Object_3DText_AppendRecord

int MTK_Object_3DText_AppendRecord(MTK_Object* obj, const char* record);
		

Description

Append a record (line) to a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

record

the record (const char*)

Return Value

0

success

other

failure

MTK_Object_3DText_DeleteAllRecords

int MTK_Object_3DText_DeleteAllRecords(MTK_Object* obj);
		

Description

Delete all records (lines) of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

Return Value

0

success

other

failure

MTK_Object_3DText_DeleteRecord

int MTK_Object_3DText_DeleteRecord(MTK_Object* obj, const int& index);
		

Description

Delete a specific record (line) of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

index

the index of the record to delete (int)

Return Value

0

success

other

failure

MTK_Object_3DText_GetAttributes

int MTK_Object_3DText_GetAttributes(
			MTK_Object* obj,
			char* font, char* scale,
			double* height, double* width,
			int* italic
			);
		

Description

Get the attributes of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

font

font of the text (char*)

scale

scale of the text  (char*)

angle

angle of the text  (double*)

height

height of the text (double*)

width

width of the text  (double*)

italic

whether the text is in italics or not (int*)

Return Value

0

success

other

failure

MTK_Object_3DText_GetDirection

int MTK_Object_3DText_GetDirection(
			MTK_Object* obj,
			double* x, double* y, double* z
			);
		

Description

Get the direction of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

x

direction x value (double*)

y

direction y value (double*)

z

direction z value (double*)

Return Value

0

success

other

failure

MTK_Object_3DText_GetNormal

int MTK_Object_3DText_GetNormal(
			MTK_Object* obj, 
			double* x, double* y, double* z
			);
		

Description

Get the normal of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

x

normal x value (double*)

y

normal y value (double*)

z

normal z value (double*)

Return Value

0

success

other

failure

MTK_Object_3DText_GetOrigin

int MTK_Object_3DText_GetOrigin(
			MTK_Object* obj,
			double* x, double* y, double* z
			);
		

Description

Get the origin of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

x

origin x value (double*)

y

origin y value (double*)

z

origin z value (double*)

Return Value

0

success

other

failure

MTK_Object_3DText_GetOriginPosition

int MTK_Object_3DText_GetOriginPosition(
			MTK_Object* obj,
			MTK_Object_TextHoriPos* horiPos,
			MTK_Object_TextVertPos* vertPos
			);
		

Description

Get the position of the origin relative to the rest of the 3D text object.

Parameters

obj

pointer to an MTK_Object struct

horiPos

horizontal position of the origin (MTK_Object_TextHoriPos*) (see below)

vertPos

vertical position of the origin (MTK_Object_TextVertPos*) (see below)

Return Value

0

success

other

failure

enum MTK_Object_TextHoriPos
{
   TEXT_HORI_LEFT,
   TEXT_HORI_CENTRE,
   TEXT_HORI_RIGHT
};

enum MTK_Object_TextVertPos
{
   TEXT_VERT_BOTTOM,
   TEXT_VERT_CENTRE,
   TEXT_VERT_TOP
};

 

MTK_Object_3DText_GetRecord

int MTK_Object_3DText_GetRecord(
			MTK_Object* obj,
			const int& index, char* record
			);
		

Description

Get a specific record (line) of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

index

the index of the desired record (int)

record

the buffer of length MTK_BUFFER_SIZE to receive the record at the index (char*)

Return Value

0

success

other

failure

MTK_Object_3DText_NRecords

int MTK_Object_3DText_NRecords(MTK_Object* obj);
		

Description

Get the number of records in a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

Return Value

int

number of records (lines) in the object

-1

failed

MTK_Object_3DText_SetAttributes

int MTK_Object_3DText_SetAttributes(
			MTK_Object* obj,
			const char* font, const char* scale, 
			const double& height, const double& width, 
			const int& italic
			);
		

Description

Set the attributes of a 3D text object. Passing a -1 or NULL will skip setting that attribute.

Parameters

obj

pointer to an MTK_Object struct

font

font of the text (const char*)

scale

scale of the text  (const char*)

angle

angle of the text (double)

height

height of the text (double)

width

width of the text  (double)

italic

whether the text is in italics or not (int)

Return Value

0

success

other

failure

MTK_Object_3DText_SetDirection

int MTK_Object_3DText_SetDirection(
			MTK_Object* obj,
			const double& x,
			const double& y,
			const double& z
			);
		

Description

Set the direction of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

x

direction x value (double)

y

direction y value (double)

z

direction z value (double)

Return Value

0

success

other

failure

MTK_Object_3DText_SetNormal

int MTK_Object_3DText_SetNormal(
			MTK_Object* obj, 
			const double& x, 
			const double& y, 
			const double& z
			);
		

Description

Set the normal of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

x

normal x value (double)

y

normal y value (double)

z

normal z value (double)

Return Value

0

success

other

failure

MTK_Object_3DText_SetOrigin

int MTK_Object_3DText_SetOrigin(
			MTK_Object* obj, 
			const double& x,
			const double& y,
			const double& z
			);
		

Description

Set the origin of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

x

origin x value (double)

y

origin y value (double)

z

origin z value (double)

Return Value

0

success

other

failure

MTK_Object_3DText_SetOriginPosition

int MTK_Object_3DText_SetOriginPosition(
			MTK_Object* obj,
			const MTK_Object_TextHoriPos& horiPos,
			const MTK_Object_TextVertPos& vertPos
			);
		

Description

Set the position of the origin relative to the rest of the 3D text object.

Parameters

obj

pointer to an MTK_Object struct

horiPos

horizontal position of the origin (MTK_Object_TextHoriPos)

vertPos

vertical position of the origin (MTK_Object_TextVertPos)

Return Value

0

success

other

failure

MTK_Object_3DText_SetRecord

int MTK_Object_3DText_SetRecord(
			MTK_Object* obj, const int& index,
			const char* record
			);
		

Description

Set a specific record (line) of a 3D text object.

Parameters

obj

pointer to an MTK_Object struct

index

the desired index of the record (int)

record

the record (const char*)

Return Value

0

success

other

failure