BimProductMesh
Hierarchy
- BimProductMeshDTO
- BimProductMesh
Index
Properties
Methods
Properties
optionalreadonlycenterOfParentIfcCube
readonlycolorTexturePixelIndex
readonlycullingDistance
Determine at what distance from the camera this mesh should be hidden.
If < 0
then mesh is never hidden. If >= 0
then mesh is hidden when distance to camera is greater than this value.
depthWriteIgnoresVisibility
If true
then mesh is written to the depth buffer even if it is not visible
readonlydescriptor
Mesh descriptor
ghostOutline
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
Parent BimIfcObject the mesh belongs to.
readonlyisOnGpu
If true
then the mesh has been transferred to the gpu, otherwise false
.
readonlyloaderElement
Parent loader element.
readonlymergeId
Determine which babylonjs mesh this ifc product mesh shall belong to.
mergeIdDescriptor
Type declaration
cullOnCameraMove: boolean
readonlymi
outline
If true
then mesh is displayed with an outline, otherwise false
. For the outline to actually show,
the postprocess effect for outlines needs to be created, which is created by calling createOutlinePipeline from PostProcessEffects
So for example you could do like this:
readonlyr
readonlysi
readonlystyle
Ifc style used by mesh
readonlyvertexData
Vertex data.
visible
If true
then mesh is visible, otherwise false
.
readonlywt
Methods
_clearMergeId
Returns boolean
aabb
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 totrue
for last mesh to ensure that the cache is cleared. Defaults totrue
.
Returns void
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 theBoundingInfo
from the first call to boundingInfo in all the subsequent calls to boundingInfo the other meshes. The end result will be a compoundBoundingInfo
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 totrue
for last mesh to ensure that the cache is cleared. Defaults totrue
.
Returns BoundingInfo
BoundingInfo
representing the aabb. IfbI
was specifie as argument then that instance is returned.
copyColorTo
Copy the RGBA color of the mesh into
dst
. Each component is0..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 todst
end up outside length ofdst
.
Returns void
defaultColor
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 totrue
for last mesh to ensure that the cache is cleared. or call loaderElement.transformsRepository.clear() afterwards. Defaults totrue
.
Returns FastTransform
getColorComponent
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 totrue
for last mesh to ensure that the cache is cleared. or call loaderElement.transformsRepository.clear() afterwards. Defaults totrue
.
Returns BimIfcMesh
setColor
Set mesh color.
Parameters
color: ArrayLike<number>
RGBA color. Each component is
0..255
.
Returns boolean
true
if color was changed. Otherwisefalse
.
transform
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 totrue
for last mesh to ensure that the cache is cleared. or call loaderElement.transformsRepository.clear() afterwards. Defaults totrue
.
Returns Matrix
Center of the cube, this mesh will be a part of, in IFC space (not worldspace)