 |
VectorFontFactoryCreateTextMesh Method |
CreateTextMesh creates a StandardMesh with the specified text and at the specified position, direction and size.
The text is represented by one StandardMesh that is created from triangulated character glyphs.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic StandardMesh? CreateTextMesh(
string text,
Vector3 textPosition,
TextPositionTypes positionType,
Vector3 textDirection,
Vector3 upDirection,
float fontSize,
TextAlignment textAlignment = TextAlignment.Left,
string? name = null
)
Parameters
- text String
- text to render (can have multiple lines)
- textPosition Vector3
- position as Vector3
- positionType TextPositionTypes
- type of text position; note that TextPositionTypes also defines the Baseline value
- textDirection Vector3
- text direction as Vector3
- upDirection Vector3
- text up direction as Vector3
- fontSize Single
- font size
- textAlignment TextAlignment (Optional)
- optional TextAlignment (Left by default)
- name String (Optional)
- optional name
Return Value
StandardMeshStandardMesh with the specified text and at the specified position, direction and size. When text is empty or contains only white space characters, then null is returned.
See Also