model.hfor precise declaration and ordering)
br_uint_16 vertices Vertices around face
br_material * material Face material
br_uint_16 smoothing Controls smoothing between shared edges
br_uint_8 flags Face flags
for the structure in which vertices are used.
Nulland the face is part of a model actor's model, then the model actor's material (as specified or inherited) will be used.
BR_RSTYLE_EDGES. The following table describes each flag.
Face structures should not be copied by assignment - copy member-wise instead. Note that faces so copied, will still need the models that refer to them to be updated before they are involved in rendering.
Access & Maintenance
Members may be freely accessed. The structure should remain valid while it is referenced by any model. Some private members are modified if
is applied to the model that references the face. Any changes to members will not affect models that use the face until
Referencing & Lifetime
Be careful of referencing faces especially ones allocated by
, they are liable to be moved around during
, say. Faces are generally only allocated as arrays completely describing a model. Always access using indexing from the model's
The structure should remain valid while it is referenced by any model. If constructed by
BR_MODF_KEEP_ORIGINAL had not been set beforehand).
If not constructed by
, ensure the structure is first zeroed, e.g using
memset(...,0,sizeof(br_face)). Set the members appropriately. Models that refer to such faces must have the flag
BR_MODF_KEEP_ORIGINAL set. Models referring to initialised faces must be updated before they are involved in rendering.
Construction & Destruction
If this structure is constructed by
(or indirectly by
) it will be destroyed with the model (or upon
BR_MODF_KEEP_ORIGINAL had not been set beforehand). It may be constructed (and appropriately destroyed) any other way (as long as
BR_MODF_KEEP_ORIGINAL is set in the model).
When constructed by
faces are allocated from the
"FACES" memory class. It is probably better to organise any enumeration around models (see
Import & Export
Faces can be imported and exported with models.
Generated with CERN WebMaker