NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import PrincipalAxes from 'ngl/src/math/principal-axes.js'
public class | source

PrincipalAxes

Principal axes

Constructor Summary

Public Constructor
public

constructor(points: Matrix)

Member Summary

Public Members
public
public
public
public
public
public
public
public
public
public
public
public
public

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 Members

public begA source

public begB source

public begC source

public center source

public endA source

public endB source

public endC source

public normVecA source

public normVecB source

public normVecC source

public vecA source

public vecB source

public vecC source

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