formZ SDK | 5.0 API Reference | Project | Modeling | Rendering | Shaders
Description
Gets the objt and face that is rendered at the current pixel. If the pixel does not belong to a formZ object, such as the preview object in the Surface Style Parameters dialog, NULL if returned for the object and -1 for findx and sym_oindx. If the pixel that is rendered belongs to a formZ object, but there is no face information available, -1 is returned for findx. This may is the case, for example, when a sphere primitive object is rendered. The is_smooth_face can be used to determine, whether findx identifies a face in the smooth topology or in the facetted topology. If it is returned as TRUE, the findx must be interpreted as a smooth face. If the object is a symbol instance, the index of the object within the symbol definition can be returned as well. This index is a zero based counter. To find the object in the symbol instance, the definition objects need to be retrieved via the function calls and fz_symb_lev_model_get_objt. The index identifies location of the object in the returned list. If the definition object contains nested symbols, the objects in the nested symbol must be accounted for as well to use the index properly. If the object is not a symbol instance, -1 is returned for sym_oindx. All function arguments are optional.
Plugin Prototype
fzrt_error_td fz_shdr_get_objt_face(
objt, | |
fzrt_int * | findx, |
is_smooth_face, | |
fzrt_int * | sym_oindx ) |
Parameters
objt [Result, Optional]
The object for the current pixel rendered, or NULL, if the pixel does not belong to an object
findx [Result, Optional]
The index of the face of the object for the current pixel rendered, or -1, if the pixel does not belong to an object, or if there is no face information available for the object.
is_smooth_face [Result, Optional]
TRUE, if the face rendered is a smooth face, FALSE otherwise
sym_oindx [Result, Optional]
the zero based counter of the definition object, to which the face belongs, if the object rendered is a symbol instance. In that case, the objt argument returned will be the symbol instance object.
Returns
Error codes.
Availability
5.5.0.0
Function Set
Defined in