C# Класс TagTool.Geometry.IndexBufferStream

Reads and writes index buffer data.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
IndexBufferStream ( Stream stream, IndexBufferFormat format ) : System

Creates an index buffer stream.

ReadIndex ( ) : uint

Reads an index and advances the stream.

ReadIndexes ( uint count ) : uint[]

Reads an array of indexes.

ReadIndexes ( uint buffer, uint offset, uint count ) : void

Reads indexes into an array and advances the stream.

ReadTriangleStrip ( uint indexCount ) : uint[]

Reads a triangle strip and converts it into a triangle list. Degenerate triangles will be included and must be discarded manually.

WriteIndex ( uint index ) : void

Writes an index and advances the stream.

WriteIndexes ( uint buffer ) : void

Writes indexes from an array and advances the stream.

WriteIndexes ( uint buffer, uint offset, uint count ) : void

Writes indexes from an array and advances the stream.

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

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

Creates an index buffer stream.
public IndexBufferStream ( Stream stream, IndexBufferFormat format ) : System
stream Stream The base stream to use. It must point to the beginning of the index buffer.
format IndexBufferFormat The format of each index in the buffer.
Результат System

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

Reads an index and advances the stream.
public ReadIndex ( ) : uint
Результат uint

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

Reads an array of indexes.
public ReadIndexes ( uint count ) : uint[]
count uint The number of indexes to read.
Результат uint[]

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

Reads indexes into an array and advances the stream.
public ReadIndexes ( uint buffer, uint offset, uint count ) : void
buffer uint The buffer to read into.
offset uint The offset into the buffer to start storing at.
count uint The number of indexes to read.
Результат void

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

Reads a triangle strip and converts it into a triangle list. Degenerate triangles will be included and must be discarded manually.
public ReadTriangleStrip ( uint indexCount ) : uint[]
indexCount uint The number of indexes in the strip. Cannot be 1 or 2.
Результат uint[]

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

Writes an index and advances the stream.
public WriteIndex ( uint index ) : void
index uint The index to write.
Результат void

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

Writes indexes from an array and advances the stream.
public WriteIndexes ( uint buffer ) : void
buffer uint The indexes to write.
Результат void

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

Writes indexes from an array and advances the stream.
public WriteIndexes ( uint buffer, uint offset, uint count ) : void
buffer uint The buffer of indexes to write.
offset uint The offset into the buffer to start writing at.
count uint The number of indexes to write.
Результат void