formZ SDK | 5.0 API Reference | Project | File Formats | Structured File Translator | Data Model

fz_ffmt_data_model_tmap_expand_uvs

Description

Maps vertex texture uv coordinates to segments. formZ stores texture uv coordinates at the segment level. Many file formats store texture uv coordinates at the vertex level. Each texture coordinate corresponds to the segment's start vertex. This function maps an array of texture uv coordinates, which correspond to an objects vertex array, to an array of texture uv coordinates which correspond to an objects segment array. This is a convenience function which can be used to prepare an array of texture uv coordinates to set a texture control using fz_objt_attr_set_objt_tctl_uv.
IMPORTANT NOTE: The segment texture coordinate array must be allocated by the translator and must at least the size obtained from fz_objt_get_segt_count.

Plugin Prototype

fzrt_int fz_ffmt_data_model_tmap_expand_uvs(

fz_objt_ptr

obj,

fz_xy_td *

xyz_uv,

fz_xy_td *

segt_uv )

Parameters

obj [Input]

The object to assign the texture coordinates to.

xyz_uv [Input]

An array of texture coordinates corresponding to the object's vertex array.

segt_uv [Result]

An array of texture coordinates corresponding to the object's segment array.

Returns

FZRT_NOERR on success. An error otherwise.

Availability

5.0.0.0

Function Set

fz_ffmt_data_model_fset


Defined in

fz_ffmt_api.h