Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Lattice

Describes a generic lattice where each cell can be accessed with unique X and Y coordinates

Hierarchy

Index

Constructors

constructor

  • new Lattice(width?: number, height?: number, cellDiameter?: number, matrix?: Matrix4): Lattice

Properties

Protected _cellDiameter

_cellDiameter: number

Private _cells

_cells: null[][] = []

[rows][columns] or:

    col0   col1

row0: [ value, value, ... ] row1: [ value, value, ... ] ...

Protected _end

_end: Vector3

Protected _height

_height: number = Lattice.DEFAULT_HEIGHT

Protected _matrix

_matrix: Matrix4

Protected _parentComponent

_parentComponent: LatticeComponent | undefined

Protected _start

_start: Vector3

Protected _width

_width: number = Lattice.DEFAULT_WIDTH

Static Protected Readonly DEFAULT_HEIGHT

DEFAULT_HEIGHT: number = 8

Static Protected Readonly DEFAULT_HEIGHT_MAX

DEFAULT_HEIGHT_MAX: number = 128

Static Protected Readonly DEFAULT_WIDTH

DEFAULT_WIDTH: number = 8

Static Protected Readonly DEFAULT_WIDTH_MAX

DEFAULT_WIDTH_MAX: number = 128

Static Protected Readonly LATTICE_COLUMN

LATTICE_COLUMN: Vector3 = new Vector3(1, 0, 0)

Static Protected Readonly LATTICE_NORMAL

LATTICE_NORMAL: Vector3 = new Vector3(0, 0, 1)

Static Protected Readonly LATTICE_ROW

LATTICE_ROW: Vector3 = new Vector3(0, 1, 0)

Accessors

cellDiameter

  • get cellDiameter(): number

height

  • get height(): number

latticeType

parentComponent

type

  • get type(): string

width

  • get width(): number

Methods

Private getAxis

  • getAxis(axis: "y" | "row" | "x" | "column" | "z" | "normal", applyCompTransf?: boolean): Vector3

getColumnAxis

  • getColumnAxis(applyCompTransf?: boolean): Vector3

getCoordinatesFromIndex

  • getCoordinatesFromIndex(index: number): {}

getIndex

  • getIndex(rowIndex: number, colIndex: number): number

getNormal

  • getNormal(applyCompTransf?: boolean): Vector3

getPosition

  • getPosition(rowIndex: number, colIndex: number, depth?: number, applyCompTransf?: boolean): Vector3
  • Given the coordinates of a lattice cell (rowIndex and colIndex), return the 3D position of that cell

    Parameters

    • rowIndex: number

      The row index of the lattice cell

    • colIndex: number

      The row index of the lattice cell

    • Default value depth: number = 0
    • Default value applyCompTransf: boolean = true

    Returns Vector3

getPositionFromIndex

  • getPositionFromIndex(index: number): Vector3

getRowAxis

  • getRowAxis(applyCompTransf?: boolean): Vector3

Protected Abstract getX

  • getX(rowIndex: number, colIndex: number): number

Protected Abstract getY

  • getY(rowIndex: number, colIndex: number): number

Protected getZ

  • getZ(depth: number): number

moveOriginToNewLocation

  • moveOriginToNewLocation(newOrigin: Vector3): void

resize

  • resize(newWidth: number, newHeight: number): void

Abstract resizeFromLengths

  • resizeFromLengths(widthLength: number, heightLength: number): void

Generated using TypeDoc