Skip to main content

BimProductMesh

Hierarchy

Index

Properties

optionalreadonlycenterOfParentIfcCube

centerOfParentIfcCube?: DeepImmutableObject<Vector3>

Center of the cube, this mesh will be a part of, in IFC space (not worldspace)

readonlycolorTexturePixelIndex

colorTexturePixelIndex: number

readonlycullingDistance

cullingDistance: number

Determine at what distance from the camera this mesh should be hidden. If &lt; 0 then mesh is never hidden. If &gt;= 0 then mesh is hidden when distance to camera is greater than this value.

depthWriteIgnoresVisibility

depthWriteIgnoresVisibility: boolean

If true then mesh is written to the depth buffer even if it is not visible

readonlydescriptor

Mesh descriptor

ghostOutline

ghostOutline: boolean

Enable/disable the ‘ghost outline’. Alias for setting visible =false and depthWriteIgnoresVisibility = true. Requires that lineshading is enabled. Otherwise the object will simply not be visible.

highlight

Set the different highlight indexes (or indices, both plurals are fine) of the product mesh. If any index but Empty is set then the product mesh will be colored to the corresponding highlight color. You can change the colors of the highlights by calling the API method

readonlyifc

Parent IFC mesh belongs to.

readonlyifcProduct

ifcProduct: BimIfcObject

Parent BimIfcObject the mesh belongs to.

readonlyisOnGpu

isOnGpu: boolean

If true then the mesh has been transferred to the gpu, otherwise false.

readonlyloaderElement

loaderElement: IBimIfcLoaderElement

Parent loader element.

readonlymergeId

mergeId: string

Determine which babylonjs mesh this ifc product mesh shall belong to.

readonlymi

mi: number

readonlyr

r: number

readonlysi

si: number

readonlystyle

Ifc style used by mesh

readonlyvertexData

vertexData: BimVertexData

Vertex data.

visible

visible: boolean

If true then mesh is visible, otherwise false.

readonlywt

wt: number

Methods

_clearMergeId

  • _clearMergeId(): boolean
  • Returns boolean

aabb

  • aabb(min: Vector3, max: Vector3, clearTransformCache?: boolean): void
  • Calculate aabb min and max value of mesh.


    Parameters

    • min: Vector3

      minimum bounding vector3.

    • max: Vector3

      maximum bounding vector3

    • optionalclearTransformCache: boolean

      Whether to clear the transform cache after calculation or not. Set to false when calculating aabb for many meshes at the same time for better performance. Set to true for last mesh to ensure that the cache is cleared. Defaults to true.

    Returns void

boundingInfo

  • boundingInfo(bI?: BoundingInfo, clearTransformCache?: boolean): BoundingInfo
  • Calculate aabb BoundingInfo of the mesh.


    Parameters

    • optionalbI: BoundingInfo

      Optional BoundingInfo if specified it will be ‘extended’ with the aabb of this mesh. Makes it simple to calculate a compound aabb for many meshes. Simply use the BoundingInfo from the first call to boundingInfo in all the subsequent calls to boundingInfo the other meshes. The end result will be a compound BoundingInfo for all the meshes.

    • optionalclearTransformCache: boolean

      Whether to clear the transform cache after calculation or not. Set to false when calculating aabb for many meshes at the same time for better performance. Set to true for last mesh to ensure that the cache is cleared. Defaults to true.

    Returns BoundingInfo

    BoundingInfo representing the aabb. If bI was specifie as argument then that instance is returned.

copyColorTo

  • copyColorTo(dst: Writeable<ArrayLike<number>>, dstOffset?: number): void
  • Copy the RGBA color of the mesh into dst. Each component is 0..255. Must be at least 4 elements.


    Parameters

    • dst: Writeable<ArrayLike<number>>

      Buffer to write color to. Must have length in multiples of 4.

    • optionaldstOffset: number

      Offset in dst. Must be specified in multiples of 4. Do not set so writes to dst end up outside length of dst.

    Returns void

defaultColor

  • defaultColor(): boolean
  • Resets back to the default color of the mesh.


    Returns boolean

    true if colors changes needed to be made.

fastTransform

  • Calculate FastTransform for mesh.


    Parameters

    • optionalclearTransformCache: boolean

      Whether to clear the transform cache after calculation or not. Set to false when calculating FastTransform transform for many meshes at the same time for better performance. Set to true for last mesh to ensure that the cache is cleared. or call loaderElement.transformsRepository.clear() afterwards. Defaults to true.

    Returns FastTransform

getColorComponent

  • getColorComponent(colorComponent: RgbaComponent): number
  • Get specific color component. Output is in range 0..255.


    Parameters

    • colorComponent: RgbaComponent

      Color component.

    Returns number

mesh

  • Gets a BimIfcMesh instance that can be used to do intersection testing and other (computationally expensive) operations.


    Parameters

    • optionalclearTransformCache: boolean

      Whether to clear the transform cache after BimIfcMesh creation or not. Set to false when creating many BimIfcMesh matrix transform for many meshes at the same time for better performance. Set to true for last mesh to ensure that the cache is cleared. or call loaderElement.transformsRepository.clear() afterwards. Defaults to true.

    Returns BimIfcMesh

setColor

  • setColor(color: ArrayLike<number>): boolean
  • Set mesh color.


    Parameters

    • color: ArrayLike<number>

      RGBA color. Each component is 0..255.

    Returns boolean

    true if color was changed. Otherwise false.

transform

  • transform(clearTransformCache?: boolean): Matrix
  • Calculate Matrix transform for mesh. Gives same wordlspace transform as fastTransform but can be used with methods that do not accept FastTransform.


    Parameters

    • optionalclearTransformCache: boolean

      Whether to clear the transform cache after calculation or not. Set to false when calculating matrix transform for many meshes at the same time for better performance. Set to true for last mesh to ensure that the cache is cleared. or call loaderElement.transformsRepository.clear() afterwards. Defaults to true.

    Returns Matrix