Click or drag to resize
AB4D logo

InstancedMeshGeometryVisual3D Properties

The InstancedMeshGeometryVisual3D type exposes the following members.

Properties
 NameDescription
Public propertyInstancesData Gets or sets an array of InstanceData structs that define the world transformations (positions, scales, rotations) and colors or instanced geometry objects. After each change of InstancesData user must call Update method.
Public propertyIsBackFaceMaterial Gets or sets a Boolean that specifies if this InstancedMeshGeometryVisual3D is rendering front or back faces of the MeshGeometry3D. Default value is false which means that front face materials are rendered.
Public propertyIsPreMultipliedAlphaColor When IsPreMultipliedAlphaColor is true (false by default) and Alpha is less then 1, then the instance colors components are already multiplied with alpha value to produce pre-multiplied colors. When false, then non-pre-multiplied color is converted in pre-multiplied color when this is required by the shader.
Public propertyIsSolidColorMaterial Gets or sets a Boolean that specifies if instanced objects are rendered with a solid color (without any shading based on lighting calculations). Default value is false.
Public propertyIsWpf3DVisible Gets a Boolean that specifies if this BaseDXVisual3D can show its content when rendered with WPF 3D objects.
(Overrides BaseDXVisual3DIsWpf3DVisible)
Public propertyIsWpfHitTestVisible Gets or sets a Boolean that specifies if WPF hit testing can be done on the instanced 3D objects when rendered with DirectX hardware acceleration. When IsWpfHitTestVisible is true then InstancedMeshGeometryVisual3D always creates WPF's GeometryModel3D objects (one for each instance) that are used by WPF's hit testing. This can greatly increase initialization time. Default value is false. When showing instanced objects, it is recommended to use DXEngine hit testing that support fast hit testing on instanced objects and leave this property on false.
Public propertyMeshGeometry3D Gets MeshGeometry3D that is used by this InstancedMeshGeometryVisual3D
Public propertySpecularMaterial Gets material that is used as a base material for this InstancedMeshGeometryVisual3D. BaseMaterial can provide additional specular material properties. After changing the property the UpdateMaterial method must be called.
Public propertyTextureAlphaClipThreshold TextureAlphaClipThreshold can be set when TextureBitmap is set. When its value is above 0 then pixels in texture with alpha color values below this value will be clipped (not rendered and their depth will not be written to depth buffer). Expected values are between 0 and 1. When 0 (by default) then alpha clipping is disabled - this means that also pixels with alpha value 0 are fully processed (they are not visible but its depth value is still written so objects that are rendered afterwards and are behind the pixel will not be visible).
Public propertyTextureBitmap When TextureBitmap is set to a BitmapSource, then this texture is used for all instances of the mesh (instance color is not used).
Public propertyTextureBlendState Gets or sets a BlendState that is used to render the texture. If null then Opaque or PremultipliedAlphaBlend (for transparent materials) will be used.
Public propertyUseAlphaBlend Gets or sets a Boolean that specifies if alpha blending is used when rendering model instances. This can be used to render semi-transparent objects. Default value is false.
Public propertyUseDynamicInstanceBuffer Gets or sets a Boolean that specifies if dynamic instance buffer is created instead of immutable instance buffer. Dynamic instance buffer has better performance when instance data is changed often. On the other side the immutable buffer is better when the instance data is not changed or changed only a few times. Default value is false - use immutable buffer.
Public propertyUseScreenSpaceScaling When true (false by default) then each instance is scaled in the shader so that the value specified in matrix's M11 defines the size of the rendered object on screen (when the size of the mesh is 1).
Top
See Also