# Class VertexDataReaderV2

##### Index

### Constructors

constructor

### Methods

deflateToRef
getFaceCount
getIndexCount
getVertexCount
readEdgeIndices
readHeader

## Constructors

### constructor

- new VertexDataReaderV2(_buffer: ArrayBuffer): VertexDataReaderV2

  #### Parameters

  - _buffer: ArrayBuffer

  #### Returns VertexDataReaderV2

## Methods

### deflateToRef

- deflateToRef(meshOffset: number, dst: BimVertexData): BimVertexData

  #### Parameters

  - meshOffset: number
  - dst: BimVertexData

  #### Returns BimVertexData

### getFaceCount

- getFaceCount(meshOffset: number): number

  #### Parameters

  - meshOffset: number

  #### Returns number

### getIndexCount

- getIndexCount(meshOffset: number): number

  #### Parameters

  - meshOffset: number

  #### Returns number

### getVertexCount

- getVertexCount(meshOffset: number): number

  #### Parameters

  - meshOffset: number

  #### Returns number

### readEdgeIndices

- readEdgeIndices(meshOffset: number): undefined | TypedArray

  Reads edge indices for a mesh, returning a typed array view into the underlying buffer. Returns undefined if the mesh has no edges.

  Validates the on-disk layout against the buffer's byte length — a crafted or truncated t8gd file must not be able to produce an OOB view or a DataView RangeError.

  The returned indices reference positions in the t8gd vertex array (position-deduplicated, one entry per unique XYZ). This is the same index space as deflateToRef writes into `dst.positions`. Consumers that expand vertices for per-vertex normals must be aware that edge indices do NOT map into the expanded array — use the original positions for lookup.

  #### Parameters

  - meshOffset: number

  #### Returns undefined | TypedArray

### readHeader

- readHeader(offset: number): MeshHeader

  #### Parameters

  - offset: number

  #### Returns MeshHeader