C# Класс ColladaXna.Base.Geometry.VertexContainer

Flexible container for vertex data
Показать файл Открыть проект

Открытые методы

Метод Описание
CreateVertexBuffer ( GraphicsDevice graphicsDevice ) : VertexBuffer

Creates a vertex buffer from this vertex container

CreateVertexDeclaration ( ) : VertexDeclaration

Dynamically creates a vertex declaration that fits the data contained by this vertex container.

HasElement ( VertexElementUsage element ) : bool

Determines whether this container contains given element type

VertexContainer ( List inputChannels ) : System

Creates a vertex container from a set of "raw" vertex channels as read from the COLLADA file. Hence, it is assumed that each channel uses its own source (rather than every channel using the same single source).

Защищенные методы

Метод Описание
CalculateVertexSize ( List channels = null ) : int

Calculates the size of a complete vertex in number of floats used

Приватные методы

Метод Описание
ConvertColorChannels ( List inputChannels ) : void

Converts input channels that are used for colors from Vector3/Vector4 to single float format, if necessary.

ConvertColorToSingle ( Color color ) : System.Single

Transforms the 4 color bytes to a single float. The resulting float might not be a valid float number; but only the bytes are important for usage later on the graphics card

Описание методов

CalculateVertexSize() защищенный Метод

Calculates the size of a complete vertex in number of floats used
protected CalculateVertexSize ( List channels = null ) : int
channels List
Результат int

CreateVertexBuffer() публичный Метод

Creates a vertex buffer from this vertex container
public CreateVertexBuffer ( GraphicsDevice graphicsDevice ) : VertexBuffer
graphicsDevice GraphicsDevice
Результат VertexBuffer

CreateVertexDeclaration() публичный Метод

Dynamically creates a vertex declaration that fits the data contained by this vertex container.
public CreateVertexDeclaration ( ) : VertexDeclaration
Результат Microsoft.Xna.Framework.Graphics.VertexDeclaration

HasElement() публичный Метод

Determines whether this container contains given element type
public HasElement ( VertexElementUsage element ) : bool
element VertexElementUsage element usage
Результат bool

VertexContainer() публичный Метод

Creates a vertex container from a set of "raw" vertex channels as read from the COLLADA file. Hence, it is assumed that each channel uses its own source (rather than every channel using the same single source).
public VertexContainer ( List inputChannels ) : System
inputChannels List Original Input Channels from COLLADA file
Результат System