Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IGetSetVerticesData

Define an interface for all classes that will get and set the data on vertices

Hierarchy

  • IGetSetVerticesData

Implemented by

Index

Methods

getIndicesSearch playground for getIndices

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

    Parameters

    • 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.

    • Optional forceCopy: boolean

      defines a boolean indicating that the returned array must be cloned upon returning it

    Returns Nullable<IndicesArray>

    the indices array or an empty array if the mesh has no geometry

getVerticesDataSearch playground for getVerticesData

  • getVerticesData(kind: string, copyWhenShared?: boolean, forceCopy?: boolean): Nullable<FloatArray>
  • Gets a specific vertex data attached to this geometry. Float data is constructed if the vertex buffer data cannot be returned directly.

    Parameters

    • kind: string

      defines the data kind (Position, normal, etc...)

    • Optional copyWhenShared: boolean

      defines if the returned array must be cloned upon returning it if the current geometry is shared between multiple meshes

    • Optional forceCopy: boolean

      defines a boolean indicating that the returned array must be cloned upon returning it

    Returns Nullable<FloatArray>

    a float array containing vertex data

isVerticesDataPresentSearch playground for isVerticesDataPresent

  • isVerticesDataPresent(kind: string): boolean
  • Gets a boolean indicating if specific vertex data is present

    Parameters

    • kind: string

      defines the vertex data kind to use

    Returns boolean

    true is data kind is present

setIndicesSearch playground for setIndices

  • Creates a new index buffer

    Parameters

    • indices: IndicesArray

      defines the indices to store in the index buffer

    • totalVertices: Nullable<number>

      defines the total number of vertices (could be null)

    • Optional updatable: boolean

      defines if the index buffer must be flagged as updatable (false by default)

    Returns void

setVerticesDataSearch playground for setVerticesData

  • setVerticesData(kind: string, data: FloatArray, updatable: boolean): void
  • Set specific vertex data

    Parameters

    • kind: string

      defines the data kind (Position, normal, etc...)

    • data: FloatArray

      defines the vertex data to use

    • updatable: boolean

      defines if the vertex must be flagged as updatable (false as default)

    Returns void

updateVerticesDataSearch playground for updateVerticesData

  • updateVerticesData(kind: string, data: FloatArray, updateExtends?: boolean, makeItUnique?: boolean): void
  • Update a specific associated vertex buffer

    Parameters

    • kind: string

      defines which buffer to write to (positions, indices, normals, etc). 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
    • data: FloatArray

      defines the data source

    • Optional updateExtends: boolean

      defines if extends info of the mesh must be updated (can be null). This is mostly useful for "position" kind

    • Optional makeItUnique: boolean

      defines if the geometry associated with the mesh must be cloned to make the change only for this mesh (and not all meshes associated with the same geometry)

    Returns void

Legend

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