formZ SDK | 4.0 Call Back Reference | Surface Style Representation

fz_srep_cbak_set_generic_parm

Description

Surface Style Representation generic set parameter function (Optional). This function is called to set the srep parameters in a generic format. This functionality is invoked, for example, when importing. All input parameters are optional. It is mandatory, that an input parameter is checked for NULL, before it is used. This function may be called with only a subset of the input parameters. For example, this function may be called to only set the diffuse reflection factor. In this case. the diffuse input parameter would be non NULL and all other parameters NULL. It is up to the plugin to use or not use a particular generic parameter.
Unlike the fz_srep_cbak_get_generic_parm_func callback, patterns are only either solid values or texture map. Procedural patterns are not set through this function.

Plugin Prototype

fzrt_error_td fz_srep_cbak_set_generic_parm(

fzrt_int

windex,

fz_rmtl_ptr

rmtl,

void *

srep_data,

fz_srep_pattern_type_enum *

col_which,

float *

col,

fz_tmap_embd_ptr

col_tmap,

fzrt_int *

col_tmap_flags,

float *

col_txr_scale,

fz_srep_shading_type_enum *

refl_which,

float *

ambient,

float *

diffuse,

float *

specular,

float *

spec_expo,

float *

spec_col,

float *

mirr,

float *

trans_misson,

float *

refr,

float *

glow,

fz_srep_pattern_type_enum *

transp_which,

float *

transp,

fz_tmap_embd_ptr

transp_tmap,

fzrt_int *

transp_tmap_flags,

float *

trn_txr_scale,

fz_srep_pattern_type_enum *

bmp_which,

fz_tmap_embd_ptr

bmp_tmap,

float *

bmp_amp,

fzrt_int *

bmp_tmap_flags,

float *

bmp_txr_scale )

Parameters

windex [Input]

project window index

rmtl [Input]

surface style to which the srep belongs

srep_data [Input]

The Surface Style Representation data.

col_which [Input, Optional]

the type of color pattern.

col [Input, Optional]

the rgb color. If col_which == FZ_SREP_PATTERN_TYPE_PLAIN.

col_tmap [Input, Optional]

the image map, if col_which == FZ_SREP_PATTERN_TYPE_MAP. If passed as non NULL, the texture map has been allocated by the calling code. The plugin should get the fields of the map with the respective api functions, such as fz_tmap_get_floc and .

col_tmap_flags [Input, Optional]

bit encoded color map option, if col_which == FZ_SREP_PATTERN_TYPE_MAP.

col_txr_scale [Input, Optional]

The scale of the color pattern, if col_which == FZ_SREP_PATTERN_TYPE_MAP

refl_which [Input, Optional]

The shading type.

ambient [Input, Optional]

The ambient reflection factor, if refl_which == FZ_SREP_REFLECTION_TYPE_SHADED.

diffuse [Input, Optional]

The diffuse reflection factor, if refl_which == FZ_SREP_REFLECTION_TYPE_SHADED.

specular [Input, Optional]

The specular reflection factor, if refl_which == FZ_SREP_REFLECTION_TYPE_SHADED.

spec_expo [Input, Optional]

The specular exponent, if refl_which == FZ_SREP_REFLECTION_TYPE_SHADED.

spec_col [Input, Optional]

The specular color, if refl_which == FZ_SREP_REFLECTION_TYPE_SHADED.

mirr [Input, Optional]

The mirror reflection factor, if refl_which == FZ_SREP_REFLECTION_TYPE_SHADED.

trans_misson [Input, Optional]

The glass like transmission factor, if refl_which == FZ_SREP_REFLECTION_TYPE_SHADED.

refr [Input, Optional]

The index of refraction (for glass like transmission), if refl_which == FZ_SREP_REFLECTION_TYPE_SHADED.

glow [Input, Optional]

The glow factor, if refl_which == FZ_SREP_REFLECTION_TYPE_SHADED.

transp_which [Input, Optional]

the type of transparency pattern.

transp [Input, Optional]

the transparency value if transp_which == FZ_SREP_PATTERN_TYPE_PLAIN

transp_tmap [Input, Optional]

the image map, if transp_which == FZ_SREP_PATTERN_TYPE_MAP. If passed as non NULL, the texture map has been allocated by the calling code. The plugin should get the fields of the map with the respective api functions, such as fz_tmap_get_floc and .

transp_tmap_flags [Input, Optional]

bit encoded transparency map option, if transp_which == FZ_SREP_PATTERN_TYPE_MAP.

trn_txr_scale [Input, Optional]

The scale of the transparency pattern, if transp_which == FZ_SREP_PATTERN_TYPE_MAP

bmp_which [Input, Optional]

the type of bump pattern.

bmp_tmap [Input, Optional]

the image map, if bmp_which == FZ_SREP_PATTERN_TYPE_MAP. If passed as non NULL, the texture map has been allocated by the calling code. The plugin should get the fields of the map with the respective api functions, such as fz_tmap_get_floc and .

bmp_amp [Input, Optional]

The amplitude of the bump pattern, if bmp_which == FZ_SREP_PATTERN_TYPE_MAP

bmp_tmap_flags [Input, Optional]

bit encoded bump map option, if bmp_which == FZ_SREP_PATTERN_TYPE_MAP.

bmp_txr_scale [Input, Optional]

The scale of the bump pattern, if bmp_which == FZ_SREP_PATTERN_TYPE_MAP

Returns

Error codes

Availability

7.0.0.0

See Also

fz_srep_cbak_get_generic_parm_func

Function Set

fz_srep_cbak_fset


Defined in

fz_srep_api.h