|
InstancedMeshGeometryVisual3DUseInstanceIdColor Method |
After calling UseInstanceIdColor method then the color of each instance is defined by the id (index) of each instance.
The addedColor4 is added the id (usually a Color4.Black is used).
The lowest 8 bits of the instance id number are written to the blue color, then to the green color, then to the red color and the highest byte (when more the 16M instances) is written to the alpha color
(for example, instanceId = 1: RGB: 0x000001; instanceId 257: RGB: 0x000102).
The color can be also used when rendering multiple instanced objects to distinguish between them (for example by using different alpha value).
To disable using instance id color call
UseInstanceObjectColor or
UseSingleObjectColor(Color).
Namespace: Ab3d.VisualsAssembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.1.9105.2048
Syntax public void UseInstanceIdColor(
Color4 addedColor4
)
Parameters
- addedColor4 Color4
-
See Also