C# Class WaveEngine.Components.Toolkit.TextComponent

Inheritance: BaseModel
显示文件 Open project: WaveEngine/Components Class Usage Examples

Private Properties

Property Type Description
AddGlyph void
AddLine void
CreateInfexBuffer void
CreateMesh Mesh
RefreshBoundingBox void
RefreshLines void
RefreshMeshes void
RefreshSize void
RefreshText void
UpdateSpriteFont void

Public Methods

Method Description
CalculateAlignmentOffset ( LineInfo &line ) : void

Calculates the alignment offset.

GetIndices ( ) : int[]

The get indices

GetVertices ( ) : System.Vector3[]

Gets the collition info.

RemoveAll ( ) : void

Removes all.

Protected Methods

Method Description
DefaultValues ( ) : void

Sets the default values of the component

Initialize ( ) : void

Initializes the component

Private Methods

Method Description
AddGlyph ( char character, System.Vector2 position, Rectangle sourceRectangle ) : void

Adds a glyph to the vertex buffer

AddLine ( string text, System.Vector2 initOffset, System.Color color ) : void

Updates the vertex buffer of the text

CreateInfexBuffer ( ) : void

Updates the size of the index buffer.

CreateMesh ( ) : Mesh

Creates the mesh.

RefreshBoundingBox ( ) : void

Updates the bonding box

RefreshLines ( ) : void

Updates the text lines

RefreshMeshes ( ) : void

Refreshes the meshes

RefreshSize ( ) : void

Updates the lines info of the text component

RefreshText ( ) : void

Refreshes the text

UpdateSpriteFont ( ) : void

Updates the sprite font

Method Details

CalculateAlignmentOffset() public method

Calculates the alignment offset.
public CalculateAlignmentOffset ( LineInfo &line ) : void
line LineInfo The line info.
return void

DefaultValues() protected method

Sets the default values of the component
protected DefaultValues ( ) : void
return void

GetIndices() public method

The get indices
public GetIndices ( ) : int[]
return int[]

GetVertices() public method

Gets the collition info.
public GetVertices ( ) : System.Vector3[]
return System.Vector3[]

Initialize() protected method

Initializes the component
protected Initialize ( ) : void
return void

RemoveAll() public method

Removes all.
public RemoveAll ( ) : void
return void