|
#define CREATE_3D_TEXT 512
#define CANCEL_AUTO_FACE_CAMERA 1024 By default the texts are turned so that they faced the camera
this is done so the text can always be read (even when viewed from behind ...)
Use to cancel this property.
*** very useful
Creates an 3D object in the shape of the given text. See example
Parameters:
font_handle:
The font to use to create the model.
To create a font call STATE_font_create().
for example:
DWORD ariel14=STATE_font_create("Ariel", 14, FONT_CREATE_DEFAULT);
text:
The text itself that will be created into a 3D model
red, green, blue:
The color of the text created. This flag has no effect when CREATE_3D_TEXT is used
When CREATE_3D_TEXT is used set STATE_object_set_color() to change the color of the object
flags:
any of the following:
FONT_WRITE_DEFAULT,
FONT_WRITE_CENTERED_X, When FONT_WRITE_CENTERED_X + FONT_WRITE_CENTERED_Y are given then the location of the object will be the center of the text
FONT_WRITE_CENTERED_Y,
FONT_WRITE_PIXELIZED, Creates ugly pixelized letters. Have no effect when CREATE_3D_TEXT is used
CREATE_3D_TEXT, This flag will add depth to the text (and many more polygons).
If you need a text label then don't use this flag. If you need a real 3D text model
Then use this flag.
When using this flag a totaly different technique is used to create the model
CANCEL_AUTO_FACE_CAMERA By default objects will turn automatically to the camera so that the
text is always readable ( even if viewing the model from behind ...)
use this flag to cancel this property. This flag has no effect when
CREATE_3D_TEXT is given
Remarks:
1. The text object that is created is very small so scaling the object is usually necessary. See example below
Example:
DWORD ariel14=STATE_font_create("Ariel", 14, FONT_CREATE_DEFAULT);
DWORD text_object=STATE_object_create_from_text(ariel14, "Johnny", 255, 128, 128, FONT_WRITE_CENTERED_X | FONT_WRITE_CENTERED_Y);
STATE_object_set_location(text_object, 5000, 5000, 5000);
double scale[3]={1000, 1000, 1000};
STATE_object_set_scale(text_object, scale);
|