Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InstancedLinesMesh

Creates an instance based on a source LinesMesh

Hierarchy

Index

Constructors

constructor

Properties

intersectionThresholdSearch playground for intersectionThreshold

intersectionThreshold: number

The intersection Threshold is the margin applied when intersection a segment of the LinesMesh with a Ray. This margin is expressed in world space coordinates, so its value may vary. Initialized with the intersectionThreshold value of the source LinesMesh

Accessors

_positions

isAnInstance

  • get isAnInstance(): boolean

lightSources

  • get lightSources(): Light[]

material

receiveShadows

  • get receiveShadows(): boolean
  • If the source mesh receives shadows

    Returns boolean

renderingGroupId

  • get renderingGroupId(): number
  • set renderingGroupId(value: number): any
  • Rendering ground id of the source mesh

    Returns number

  • Rendering ground id of the source mesh

    Parameters

    • value: number

    Returns any

skeleton

sourceMesh

  • get sourceMesh(): Mesh

visibility

  • get visibility(): number
  • Visibility of the source mesh

    Returns number

Methods

_removeLightSourceSearch playground for _removeLightSource

  • _removeLightSource(): void

_resyncLightSourceSearch playground for _resyncLightSource

  • _resyncLightSource(): void

_resyncLightSourcesSearch playground for _resyncLightSources

  • _resyncLightSources(): void

cloneSearch playground for clone

  • Creates a new InstancedMesh from the current mesh.

    • name (string) : the cloned mesh name
    • newParent (optional Node) : the optional Node to parent the clone to.
    • doNotCloneChildren (optional boolean, default false) : if true the model children aren't cloned.

    Returns the clone.

    Parameters

    • name: string
    • Optional newParent: Nullable<Node>
    • Optional doNotCloneChildren: boolean

    Returns InstancedMesh

createInstanceSearch playground for createInstance

createOrUpdateSubmeshesOctreeSearch playground for createOrUpdateSubmeshesOctree

  • createOrUpdateSubmeshesOctree(maxCapacity?: number, maxDepth?: number): Octree<SubMesh>

disposeSearch playground for dispose

  • dispose(doNotRecurse?: boolean, disposeMaterialAndTextures?: boolean): void
  • Disposes the InstancedMesh. Returns nothing.

    Parameters

    • Optional doNotRecurse: boolean
    • Optional disposeMaterialAndTextures: boolean

    Returns void

enableEdgesRenderingSearch playground for enableEdgesRendering

  • enableEdgesRendering(epsilon?: number, checkVerticesInsteadOfIndices?: boolean): InstancedLinesMesh
  • Enables the edge rendering mode on the mesh. This mode makes the mesh edges visible

    see

    https://www.babylonjs-playground.com/#19O9TU#0

    Parameters

    • Optional epsilon: number

      defines the maximal distance between two angles to detect a face

    • Optional checkVerticesInsteadOfIndices: boolean

      indicates that we should check vertex list directly instead of faces

    Returns InstancedLinesMesh

    the current InstancedLinesMesh

getClassNameSearch playground for getClassName

  • getClassName(): string
  • Returns the string "InstancedLinesMesh".

    Returns string

getIndicesSearch playground for getIndices

getLODSearch playground for getLOD

getTotalIndicesSearch playground for getTotalIndices

  • getTotalIndices(): number
  • Returns a positive integer : the total number of indices in this mesh geometry.

    Returns number

    the number of indices or zero if the mesh has no geometry.

getTotalVerticesSearch playground for getTotalVertices

  • getTotalVertices(): number
  • Returns the total number of vertices (integer).

    Returns number

getVerticesDataSearch playground for getVerticesData

  • Returns an array of integers or a typed array (Int32Array, Uint32Array, Uint16Array) populated with the mesh indices.

    Parameters

    • kind: string

      kind of verticies to retrieve (eg. positions, normals, uvs, etc.)

    • Optional copyWhenShared: boolean

      If true (default false) and and if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one.

    Returns Nullable<FloatArray>

    a float array or a Float32Array of the requested kind of data : positions, normals, uvs, etc.

getWorldMatrixSearch playground for getWorldMatrix

isReadySearch playground for isReady

  • isReady(completeCheck?: boolean): boolean
  • Is this node ready to be used/rendered

    Parameters

    • Optional completeCheck: boolean

      defines if a complete check (including materials and lights) has to be done (false by default)

    Returns boolean

    is it ready

isVerticesDataPresentSearch playground for isVerticesDataPresent

  • isVerticesDataPresent(kind: string): boolean
  • Boolean : True if the mesh owns the requested kind of data.

    Parameters

    • kind: string

    Returns boolean

refreshBoundingInfoSearch playground for refreshBoundingInfo

  • refreshBoundingInfo(applySkeleton?: boolean, applyMorph?: boolean): InstancedMesh
  • This method recomputes and sets a new BoundingInfo to the mesh unless it is locked. This means the mesh underlying bounding box and sphere are recomputed.

    Parameters

    • Optional applySkeleton: boolean

      defines whether to apply the skeleton before computing the bounding info

    • Optional applyMorph: boolean

      defines whether to apply the morph target before computing the bounding info

    Returns InstancedMesh

    the current mesh

setIndicesSearch playground for setIndices

  • Sets the mesh indices. Expects an array populated with integers or a typed array (Int32Array, Uint32Array, Uint16Array). If the mesh has no geometry, a new Geometry object is created and set to the mesh. This method creates a new index buffer each call. Returns the Mesh.

    Parameters

    Returns Mesh

setVerticesDataSearch playground for setVerticesData

  • Sets the vertex data of the mesh geometry for the requested kind. If the mesh has no geometry, a new Geometry object is set to the mesh and then passed this vertex data. The data are either a numeric array either a Float32Array. The parameter updatable is passed as is to the underlying Geometry object constructor (if initially none) or updater. The parameter stride is an optional positive integer, it is usually automatically deducted from the kind (3 for positions or normals, 2 for UV, etc). Note that a new underlying VertexBuffer object is created each call. If the kind is the PositionKind, the mesh BoundingInfo is renewed, so the bounding box and sphere, and the mesh World Matrix is recomputed.

    Possible kind values :

    • VertexBuffer.PositionKind
    • VertexBuffer.UVKind
    • VertexBuffer.UV2Kind
    • VertexBuffer.UV3Kind
    • VertexBuffer.UV4Kind
    • VertexBuffer.UV5Kind
    • VertexBuffer.UV6Kind
    • VertexBuffer.ColorKind
    • VertexBuffer.MatricesIndicesKind
    • VertexBuffer.MatricesIndicesExtraKind
    • VertexBuffer.MatricesWeightsKind
    • VertexBuffer.MatricesWeightsExtraKind

    Returns the Mesh.

    Parameters

    • kind: string
    • data: FloatArray
    • Optional updatable: boolean
    • Optional stride: number

    Returns AbstractMesh

updateVerticesDataSearch playground for updateVerticesData

  • updateVerticesData(kind: string, data: FloatArray, updateExtends?: boolean, makeItUnique?: boolean): Mesh
  • Updates the existing vertex data of the mesh geometry for the requested kind. If the mesh has no geometry, it is simply returned as it is. The data are either a numeric array either a Float32Array. No new underlying VertexBuffer object is created. If the kind is the PositionKind and if updateExtends is true, the mesh BoundingInfo is renewed, so the bounding box and sphere, and the mesh World Matrix is recomputed. If the parameter makeItUnique is true, a new global geometry is created from this positions and is set to the mesh.

    Possible kind values :

    • VertexBuffer.PositionKind
    • VertexBuffer.UVKind
    • VertexBuffer.UV2Kind
    • VertexBuffer.UV3Kind
    • VertexBuffer.UV4Kind
    • VertexBuffer.UV5Kind
    • VertexBuffer.UV6Kind
    • VertexBuffer.ColorKind
    • VertexBuffer.MatricesIndicesKind
    • VertexBuffer.MatricesIndicesExtraKind
    • VertexBuffer.MatricesWeightsKind
    • VertexBuffer.MatricesWeightsExtraKind

    Returns the Mesh.

    Parameters

    • kind: string
    • data: FloatArray
    • Optional updateExtends: boolean
    • Optional makeItUnique: boolean

    Returns Mesh

Legend

  • Constructor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Property
  • Method
  • Static property
  • Static method