# Class VertexDataMerge

Represents a geometry that consists of one or more IFC objects

#### Implements

- Geometry3d

##### Index

### Constructors

constructor

### Properties

id
indiceCount
isTransparent
primitiveCount
productsAndMeshes

### Accessors

aabb
center
cullingDistance
cullOnCameraMove
indices
positions
uvs

### Methods

applyToGeometry
applyToMesh
compact
copyNormalsTo
merge
toHandle

## Constructors

### constructor

- new VertexDataMerge(
  id: string,
  geometryBuffer: GeometryBuffer,
  _meshes: BimProductMesh[],
  options?: VertexDataMergeOptions,
  ): VertexDataMerge

  #### Parameters

  - id: string
  - geometryBuffer: GeometryBuffer
  - _meshes: BimProductMesh[]
  - `Optional` options: VertexDataMergeOptions

  #### Returns VertexDataMerge

## Properties

### `Readonly` id

id: string

The unique identifier for the geometry.

Implementation of Geometry3d.id

### indiceCount

indiceCount: number = 0

### `Readonly` isTransparent

isTransparent: boolean

Indicates whether the geometry is transparent.

Implementation of Geometry3d.isTransparent

### primitiveCount

primitiveCount: number = 0

### `Readonly` productsAndMeshes

productsAndMeshes: Map<BimIfcObject, Set<BimProductMesh>> = ...

The products and meshes associated with the geometry.

Implementation of Geometry3d.productsAndMeshes

## Accessors

### aabb

- get aabb(): { max: Vector3; min: Vector3 }

  The axis-aligned bounding box of the geometry.

  #### Returns { max: Vector3; min: Vector3 }

  Implementation of Geometry3d.aabb

### center

- get center(): Vector3

  The center of the geometry's axis-aligned bounding box in IFC space.

  #### Returns Vector3

  Implementation of Geometry3d.center

### cullingDistance

- get cullingDistance(): number

  The distance at which the geometry should be culled.

  #### Returns number

  Implementation of Geometry3d.cullingDistance

### cullOnCameraMove

- get cullOnCameraMove(): boolean

  Specifies whether to cull the geometry when the camera moves.

  #### Returns boolean

  Implementation of Geometry3d.cullOnCameraMove

### indices

- get indices(): GeometryIndiceArray

  Indices. Describes triangles by referencing items in positions.

  #### Returns GeometryIndiceArray

  Implementation of Geometry3d.indices

### positions

- get positions(): Float32Array<ArrayBufferLike>

  Positions (x,y,z).

  #### Returns Float32Array<ArrayBufferLike>

  Implementation of Geometry3d.positions

### uvs

- get uvs(): Float32Array<ArrayBufferLike>

  Uvs (u,v)

  #### Returns Float32Array<ArrayBufferLike>

  Implementation of Geometry3d.uvs

## Methods

### applyToGeometry

- applyToGeometry(babylonGeometry: Geometry, engine: Engine): void

  Applies the geometry data this instances represents (positions, uvs, indices, aabb and optionally `normals`.) to the specified Geometry. Notice that the geometry is in IFC space. If geometry is assing to a Mesh one can use coordinateSystems.toBabylonTransform as the mesh pretransform matrix. This will ensure that mesh behaves as if it is in BabylonJS worldspace.

  #### Parameters

  - babylonGeometry: Geometry

    Geometry to receive geometry data.

  - engine: Engine

  #### Returns void

  Implementation of Geometry3d.applyToGeometry

### applyToMesh

- applyToMesh(mesh: Mesh, engine: Engine): void

  Applies the geometry data this instances represents (positions, uvs, indices, aabb and optionally `normals`.) to the specified Mesh.

  #### Parameters

  - mesh: Mesh

    Mesh to receive geometry data.

  - engine: Engine

  #### Returns void

  Implementation of Geometry3d.applyToMesh

### compact

- compact(): void

  Replaces the internal geometry arrays with tightly-sized copies of the actually-written prefix. After this call, the views into the GeometryBuffer that backed the merge are dropped, so the underlying ArrayBuffers become GC-eligible once the GeometryBuffer itself goes out of scope.

  Safe to call only after merge. Result-equivalent on repeated calls but each call performs a fresh allocation; do not call more than once per merge. _currentOffset is preserved so that applyToGeometry and copyNormalsTo continue to compute identical bounds.

  The indices array constructor (Uint16Array vs Uint32Array) is preserved; we deliberately do NOT downgrade Uint32 to Uint16 even when the actual position count fits, because consumers may hold references typed against the original choice.

  #### Returns void

### copyNormalsTo

- copyNormalsTo<T extends Writeable<ArrayLike<number>>>(dst: T): T

  Copies normals to existing array.

  #### Type Parameters

  - T extends Writeable<ArrayLike<number>>

  #### Parameters

  - dst: T

  #### Returns T

  Implementation of Geometry3d.copyNormalsTo

### merge

- merge(): Geometry3d

  #### Returns Geometry3d

### toHandle

- toHandle(): Geometry3dHandle

  Handle for this geometry. Can be used to unload the geometry from the GPU.

  #### Returns Geometry3dHandle

  Implementation of Geometry3d.toHandle