# Class BimVertexDataRepository

##### Index

### Constructors

constructor

### Accessors

hasBatchSupport
sizeInBytes
wasmMemoryUsage

### Methods

clear
dispose
get
load
readEdgeIndices
registerTransformsWithProcessor
releaseV2MeshSources
releaseV2MeshSourcesFor
setGeometryProcessor
write
writeBatch

## Constructors

### constructor

- new BimVertexDataRepository(
  _bimApiClient: BimCoreApiClient,
  options?: BimVertexDataRepositoryOptions,
  ): BimVertexDataRepository

  #### Parameters

  - _bimApiClient: BimCoreApiClient
  - `Optional` options: BimVertexDataRepositoryOptions

  #### Returns BimVertexDataRepository

## Accessors

### hasBatchSupport

- get hasBatchSupport(): boolean

  #### Returns boolean

### sizeInBytes

- get sizeInBytes(): number

  #### Returns number

### wasmMemoryUsage

- get wasmMemoryUsage(): {
  allocated: number;
  capacity: number;
  outputBuffers: number;
  used: number;
  }

  #### Returns { allocated: number; capacity: number; outputBuffers: number; used: number }

## Methods

### clear

- clear(): void

  #### Returns void

### dispose

- dispose(): void

  #### Returns void

### get

- get(md: BimProductMeshDescriptor): BimVertexData

  #### Parameters

  - md: BimProductMeshDescriptor

  #### Returns BimVertexData

### load

- load(loaderElement: IBimIfcLoaderElement): Promise<boolean>

  #### Parameters

  - loaderElement: IBimIfcLoaderElement

  #### Returns Promise<boolean>

### readEdgeIndices

- readEdgeIndices(hash: string): undefined | Uint32Array<ArrayBufferLike>

  Reads edge indices for a mesh as a freshly-allocated Uint32Array (or undefined when the mesh has no edges or is not loaded). The copy is intentional: callers are free to retain the returned array across releaseV2MeshSourcesFor / releaseV2MeshSources calls, which would otherwise detach an underlying view.

  #### Parameters

  - hash: string

  #### Returns undefined | Uint32Array<ArrayBufferLike>

### registerTransformsWithProcessor

- registerTransformsWithProcessor(
  loaderElement: IBimIfcLoaderElement,
  transforms: (undefined | BimTransform)[],
  ): void

  #### Parameters

  - loaderElement: IBimIfcLoaderElement
  - transforms: (undefined | BimTransform)[]

  #### Returns void

### releaseV2MeshSources

- releaseV2MeshSources(): void

  Releases retained V2 geometry buffers after all edges have been read.

  #### Returns void

### releaseV2MeshSourcesFor

- releaseV2MeshSourcesFor(hashes: ReadonlySet<string>): void

  Releases retained V2 geometry buffers for a specific set of mesh hashes. Use this when several loader elements share one repository — each element releases only the hashes it consumed, so concurrent peers can still resolve their edges.

  #### Parameters

  - hashes: ReadonlySet<string>

  #### Returns void

### setGeometryProcessor

- setGeometryProcessor(processor: WasmGeometryProcessor): void

  #### Parameters

  - processor: WasmGeometryProcessor

  #### Returns void

### write

- write(
  ifcProductMesh: BimProductMesh,
  transform: FastTransform,
  destination: GeometryArrays,
  offset: GeometryArrayOffset,
  aabb: { max: Vector3; min: Vector3 },
  options: { includeNormals?: boolean },
  ): { indexCount: number; vertexCount: number }

  #### Parameters

  - ifcProductMesh: BimProductMesh
  - transform: FastTransform
  - destination: GeometryArrays
  - offset: GeometryArrayOffset
  - aabb: { max: Vector3; min: Vector3 }
  - options: { includeNormals?: boolean }

  #### Returns { indexCount: number; vertexCount: number }

### writeBatch

- writeBatch(
  meshes: BimProductMesh[],
  destination: GeometryArrays,
  offset: GeometryArrayOffset,
  ): undefined | WriteBatchResult

  #### Parameters

  - meshes: BimProductMesh[]
  - destination: GeometryArrays
  - offset: GeometryArrayOffset

  #### Returns undefined | WriteBatchResult