Click or drag to resize
AB4D logo

InstancedTextNode Class

InstancedTextNode is a SceneNode that can be used to render millions of characters with different colors, position and size. The InstancedTextNode renders each used character to a texture and then to renders all occurrences of the character with using object instancing. Because rendered characters use transparent background, the InstancedTextNode uses alpha-clipping to render them correctly without the need to sort then by their distance to the camera.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXSharedDXResource
      Ab3d.DirectXSharedDXSceneResource
        Ab3d.DirectXSceneNode
          Ab3d.DirectXObjectNode
            Ab3d.DirectX.ModelsInstancedTextNode

Namespace: Ab3d.DirectX.Models
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.0.8865.1045
Syntax
C#
public class InstancedTextNode : ObjectNode

The InstancedTextNode type exposes the following members.

Constructors
 NameDescription
Public methodInstancedTextNode Constructor
Top
Properties
 NameDescription
Public propertyAlphaClipThreshold AlphaClipThreshold is used to correctly render the textures with rendered characters and transparent background. It specifies at which alpha value the pixels will be clipped (not rendered and their depth will not be written to the depth buffer). Default value is 0.15. When set to 0, then alpha-clipping is disabled and in this case the characters may not be rendered correctly.
Public propertyCharactersCount Gets the number of characters rendered by this InstancedTextNode.
Public propertyFontFamily Gets the FontFamily that is used by this InstancedTextNode
Public propertyFontWeight Gets the FontWeight that is used by this InstancedTextNode
Top
Methods
 NameDescription
Public methodAddText(String, Color, Matrix3D, Boolean) Add the specified text to the InstancedTextNode with the worldMatrix instead of position and size parameters. The orientation of the text is fully defined by the worldMatrix and therefore the orientation defined by the SetTextDirection(Vector3D, Vector3D) method is not used.
Public methodAddText(String, Color, Point3D, Double, Boolean) Add the specified text to the InstancedTextNode with using simple position and size parameters. The orientation of the text is defined by the SetTextDirection(Vector3D, Vector3D) method.
Public methodCollectRenderableObjects The task of the CollectRenderableObjects method is to create objects derived from RenderablePrimitiveBase and add them to the appropriate RenderingQueue. This method is called at the beginning of RenderScene method call but only when the scene was significantly changed (number of SceneNodes is changed, material is significantly changed, etc.)
(Overrides ObjectNodeCollectRenderableObjects)
Public methodGetReport Gets a string with a report that provides information which characters are used in this InstanceTextNode.
Public methodRemoveText RemoveText removes the specified instancedText from this InstancedTextNode
Public methodSetTextDirection Sets the direction and orientation of the text that is added by AddText(String, Color, Point3D, Double, Boolean). By default the textDirection is set to (1, 0, 0) and upDirection is set to (0, 1, 0)
Public methodUpdate Update method is called on each update phase (before render phase)
(Overrides SceneNodeUpdate)
Top
Fields
 NameDescription
Public fieldFontBitmapSize Gets the size of the bitmap that is used to render font characters.
Top
Extension Methods
 NameDescription
Public Extension MethodGetGeometryModel3D Returns a WPF's GeometryModel3D that was used to create the specified sceneNode. If the sceneNode does not define a GeometryModel3D object, then null is returned.
(Defined by Extensions)
Public Extension MethodGetModel3D Returns a WPF's Model3D that was used to create the specified sceneNode. If the sceneNode does not define a Model3D object, then null is returned.
(Defined by Extensions)
Public Extension MethodGetModelVisual3D Returns a WPF's ModelVisual3D that was used to create the specified sceneNode or any parent SceneNode (in case searchParentSceneNodes is true). If a SceneNode that defines a ModelVisual3D is not found, then null is returned.
(Defined by Extensions)
Public Extension MethodGetVisual3D Returns a WPF's Visual3D that was used to create the specified sceneNode or any parent SceneNode (in case searchParentSceneNodes is true). If a SceneNode that defines a Visual3D is not found, then null is returned.
(Defined by Extensions)
Top
See Also