Table of Contents

Class VBIB

Namespace
ValveResourceFormat.Blocks
Assembly
ValveResourceFormat.dll

"VBIB" block.

public class VBIB : Block

Inheritance

Derived

Inherited Members

Extension Methods

Constructors

VBIB()

Initializes a new instance of the ValveResourceFormat.Blocks.VBIB class.

public VBIB()

VBIB(Resource, KVObject)

Initializes a new instance of the ValveResourceFormat.Blocks.VBIB class from a resource and KV data.

public VBIB(Resource resource, KVObject data)

Parameters

resource Resource
data KVObject

Properties

IndexBuffers

Gets the list of index buffers.

public List<VBIB.OnDiskBufferData> IndexBuffers { get; }

Property Value

List<VBIB.OnDiskBufferData>

Type

Gets the block type.

public override BlockType Type { get; }

Property Value

BlockType

VertexBuffers

Gets the list of vertex buffers.

public List<VBIB.OnDiskBufferData> VertexBuffers { get; }

Property Value

List<VBIB.OnDiskBufferData>

Methods

GetBlendIndicesArray(OnDiskBufferData, RenderInputLayoutField, int[])

Extracts blend indices from a vertex buffer, optionally remapping them using the provided table.

public static ushort[] GetBlendIndicesArray(VBIB.OnDiskBufferData vertexBuffer, VBIB.RenderInputLayoutField attribute, int[] remapTable = null)

Parameters

vertexBuffer VBIB.OnDiskBufferData
attribute VBIB.RenderInputLayoutField
remapTable int[]

Returns

ushort[]

GetBlendWeightsArray(OnDiskBufferData, RenderInputLayoutField)

Extracts blend weights from a vertex buffer.

public static Vector4[] GetBlendWeightsArray(VBIB.OnDiskBufferData vertexBuffer, VBIB.RenderInputLayoutField attribute)

Parameters

vertexBuffer VBIB.OnDiskBufferData
attribute VBIB.RenderInputLayoutField

Returns

Vector4[]

GetFormatInfo(RenderInputLayoutField)

Gets the element size and count for a given render input layout field format.

public static (int ElementSize, int ElementCount) GetFormatInfo(VBIB.RenderInputLayoutField attribute)

Parameters

attribute VBIB.RenderInputLayoutField

Returns

(int ElementSize, int ElementCount)

GetNormalTangentArray(OnDiskBufferData, RenderInputLayoutField)

Extracts normal and tangent data from a vertex buffer. Tangent array will be empty if normals are not compressed.

public static (Vector3[] Normals, Vector4[] Tangents) GetNormalTangentArray(VBIB.OnDiskBufferData vertexBuffer, VBIB.RenderInputLayoutField attribute)

Parameters

vertexBuffer VBIB.OnDiskBufferData
attribute VBIB.RenderInputLayoutField

Returns

(Vector3[] Normals, Vector4[] Tangents)

GetScalarAttributeArray(OnDiskBufferData, RenderInputLayoutField)

Extracts scalar (single float) attribute data from a vertex buffer.

public static float[] GetScalarAttributeArray(VBIB.OnDiskBufferData vertexBuffer, VBIB.RenderInputLayoutField attribute)

Parameters

vertexBuffer VBIB.OnDiskBufferData
attribute VBIB.RenderInputLayoutField

Returns

float[]

GetVector2AttributeArray(OnDiskBufferData, RenderInputLayoutField)

Extracts 2D vector attribute data from a vertex buffer.

public static Vector2[] GetVector2AttributeArray(VBIB.OnDiskBufferData vertexBuffer, VBIB.RenderInputLayoutField attribute)

Parameters

vertexBuffer VBIB.OnDiskBufferData
attribute VBIB.RenderInputLayoutField

Returns

Vector2[]

GetVector3AttributeArray(OnDiskBufferData, RenderInputLayoutField)

Extracts 3D vector attribute data from a vertex buffer.

public static Vector3[] GetVector3AttributeArray(VBIB.OnDiskBufferData vertexBuffer, VBIB.RenderInputLayoutField attribute)

Parameters

vertexBuffer VBIB.OnDiskBufferData
attribute VBIB.RenderInputLayoutField

Returns

Vector3[]

GetVector4AttributeArray(OnDiskBufferData, RenderInputLayoutField)

Extracts 4D vector attribute data from a vertex buffer.

public static Vector4[] GetVector4AttributeArray(VBIB.OnDiskBufferData vertexBuffer, VBIB.RenderInputLayoutField attribute)

Parameters

vertexBuffer VBIB.OnDiskBufferData
attribute VBIB.RenderInputLayoutField

Returns

Vector4[]

Read(BinaryReader)

Reads the block data from a binary reader.

public override void Read(BinaryReader reader)

Parameters

reader BinaryReader

The binary reader to read from.

Serialize(Stream)

Writes the binary representation of the object to Stream.

public override void Serialize(Stream stream)

Parameters

stream Stream

Stream.

WriteText(IndentedTextWriter)

Writes the correct text dump of the object to IndentedTextWriter.

public override void WriteText(IndentedTextWriter writer)

Parameters

writer IndentedTextWriter

IndentedTextWriter.

Remarks

Outputs information about vertex and index buffers including their attributes and formats.