 |
BitmapTextCreatorCreateTextNode Method |
CreateTextNode creates a SceneNode (MeshModelNode or GroupNode) with the specified text and at the specified position, direction and size.
The text is represented by one or more plane meshes that show bitmap characters as textures.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntaxpublic SceneNode CreateTextNode(
string text,
Vector3 position,
PositionTypes positionType,
Vector3 textDirection,
Vector3 upDirection,
float fontSize,
Color4 textColor,
bool isSolidColorMaterial = true,
float maxWidth = 0f,
float fontStretch = 1f,
string? name = null
)
Parameters
- text String
- text to render (can have multiple lines)
- position Vector3
- position as Vector3
- positionType PositionTypes
- type of position
- textDirection Vector3
- text direction as Vector3
- upDirection Vector3
- text up direction as Vector3
- fontSize Single
- font size
- textColor Color4
- text color as Color4
- isSolidColorMaterial Boolean (Optional)
- when true (by default) then solid color material is used. In this case the text will always be rendered with the specified textColor and will not be shaded by lighting.
- maxWidth Single (Optional)
- when bigger than 0 (0 by default) then it specifies the max text width - if wider, then text is automatically wrapped into a new line after the last word (or character if the word is longer then maxWidth).
- fontStretch Single (Optional)
- amount of horizontal font stretch (1 by default does not stretch the font)
- name String (Optional)
- optional name
Return Value
SceneNodeSceneNode with the specified text and at the specified position, direction and size. When multiple MeshModelNode are needed to render the text, then GroupNode is returned; otherwise a single MeshModelNode is returned
Remarks[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.BitmapTextCreator.CreateTextNode(System.String,System.Numerics.Vector3,Ab4d.SharpEngine.Common.PositionTypes,System.Numerics.Vector3,System.Numerics.Vector3,System.Single,Ab4d.SharpEngine.Common.Color4,System.Boolean,System.Single,System.Single,System.String)"]
See Also