C# Class TagTool.Geometry.IndexBufferStream

Reads and writes index buffer data.
显示文件 Open project: TheGuardians/TagTool Class Usage Examples

Public Methods

Method Description
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.

Method Details

IndexBufferStream() public method

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.
return System

ReadIndex() public method

Reads an index and advances the stream.
public ReadIndex ( ) : uint
return uint

ReadIndexes() public method

Reads an array of indexes.
public ReadIndexes ( uint count ) : uint[]
count uint The number of indexes to read.
return uint[]

ReadIndexes() public method

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.
return void

ReadTriangleStrip() public method

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.
return uint[]

WriteIndex() public method

Writes an index and advances the stream.
public WriteIndex ( uint index ) : void
index uint The index to write.
return void

WriteIndexes() public method

Writes indexes from an array and advances the stream.
public WriteIndexes ( uint buffer ) : void
buffer uint The indexes to write.
return void

WriteIndexes() public method

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.
return void