NGL@0.10.4 Home Manual Reference Source GalleryRepository
import PrincipalAxes from 'ngl/src/math/principal-axes.js'
public class | source

PrincipalAxes

Principal axes

Constructor Summary

Public Constructor
public

constructor(points: Matrix)

Method Summary

Public Methods
public

getBasisMatrix(optionalTarget: Matrix4): Matrix4

Get the basis matrix descriping the axes

public

getProjectedScaleForAtoms(structure: Structure | StructureView): {d1a: Number, d2a: Number, d3a: Number, d1b: Number, d2b: Number, d3b: Number}

Get the scale/length for each dimension for a box around the axes to enclose the atoms of a structure

public

Get a quaternion descriping the axes rotation

Public Constructors

public constructor(points: Matrix) source

Params:

NameTypeAttributeDescription
points Matrix

3 by N matrix

Public Methods

public getBasisMatrix(optionalTarget: Matrix4): Matrix4 source

Get the basis matrix descriping the axes

Params:

NameTypeAttributeDescription
optionalTarget Matrix4
  • optional

target object

Return:

Matrix4

the basis

public getProjectedScaleForAtoms(structure: Structure | StructureView): {d1a: Number, d2a: Number, d3a: Number, d1b: Number, d2b: Number, d3b: Number} source

Get the scale/length for each dimension for a box around the axes to enclose the atoms of a structure

Params:

NameTypeAttributeDescription
structure Structure | StructureView

the structure

Return:

{d1a: Number, d2a: Number, d3a: Number, d1b: Number, d2b: Number, d3b: Number}

scale

public getRotationQuaternion(optionalTarget: Quaternion): Quaternion source

Get a quaternion descriping the axes rotation

Params:

NameTypeAttributeDescription
optionalTarget Quaternion
  • optional

target object

Return:

Quaternion

the rotation