ModelSimplifyFlags
Description
Flags for choosing action for simplifying models.
When the ProcessThis flag is present, these actions are performed for each Model, in the order given:
If the ProcessChildren flag is present, the child models are processed (between steps 5 and 6, if ProcessThis is also present) by calling IModel.Simplify on each child. The ProcessThis flag is always set for these calls. If ProcessRecursively is present, the ProcessChildren flag will be retained, otherwise it will be dropped.
- See also
Public / Constants
RemoveRedundant
Removes redundant information from models and parts.
The following information is removed if redundant:
-
Parent-child relationships between two IModel objects which can be replaced with a single IModel node without causing a behavioural change in the model hierarchy. A change of the IModel.Name property from
null
to a non-empty name is allowed, though. -
Redundant model part flags, as described by ModelPartFlags.
-
IMaterial.LineThickness is set to
1
, if PrimitiveBatch.IsLines of IModelPart.Batch returnsfalse
. -
Clear IMaterial.BaseColor of IModelPart.Material to ColorF.Black, if ColorF.A of IMaterial.BaseColor.IMaterialPart.Value is almost equal to
0
and IModelPart.Flags does not contain ModelPartFlags.Opaque. -
Set IMaterialPartBase.Channel of IModelPart.Material to
0
if IMaterialPartBase.Map isnull
or if the material part is multi-channel.
- See also
RemoveEmptyParts
Remove empty model parts.
A model part is considered empty in any of these cases:
-
PrimitiveBatch.Count of IModelPart.Batch is zero.
-
IModelPart.Geometry is
null
. -
PrimitiveBatch.Indexed of IModelPart.Batch is
true
and IModelGeometry.IndexCount of IModelPart.Geometry is zero. -
IModelGeometry.VertexCount of IModelPart.Geometry is zero.
- See also
RemoveEmptyChildren
Remove empty child models.
A child model is considered empty in any of these cases:
-
IModel.ChildCount is zero and IModel.PartCount is zero.
ReplaceEquivalent
Replace different IModelPart, IModelGeometry, IModelTexture and IMaterial objects that are equivalent with the first object that has been encountered?
SortChildren
Sorts the child nodes: by name (ascending), then by part count (descending), then by child count (descending).
MergeParts
Merge subsequent model parts, if possible?
The IModelPart.Merge method is used for merging subsequent model parts.
- See also
ProcessThis
Simplify the model on which IModel.Simplify is called?
ProcessChildren
Simplify the children of the model on which IModel.Simplify is called?
ProcessRecursively
Simplify the descendants of the model on which IModel.Simplify is called?
If ProcessChildren is not present, this flag will be ignored.