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

AxesRepresentation

Extends:

RepresentationStructureRepresentation → AxesRepresentation

Axes representation. Show principal axes and/or a box aligned with them that fits the structure or selection.

Name: axes

Example:

stage.loadFile( "rcsb://3pqr", {
    assembly: "BU1"
} ).then( function( o ){
    o.addRepresentation( "cartoon" );
    o.addRepresentation( "axes", {
        sele: "RET", showAxes: false, showBox: true, radius: 0.2
    } );
    o.addRepresentation( "ball+stick", { sele: "RET" } );
    o.addRepresentation( "axes", {
        sele: ":B and backbone", showAxes: false, showBox: true, radius: 0.2
    } );
    stage.autoView();
    var pa = o.structure.getPrincipalAxes();
    stage.animationControls.rotate( pa.getRotationQuaternion(), 1500 );
} );

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public
public
public

Method Summary

Public Methods
public

create()

public
public
public

init()

public

Inherited Summary

From class Representation
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public

Counter that keeps track of tasks related to the creation of the representation, including surface calculations.

public
public
public
public
private
private
public

attach()

public

build()

public

clear()

public

create()

public
public
public
public
public

init()

public

make()

public
public

Set the visibility of the representation

public

setVisibility(value: Boolean, noRenderRequest: Boolean): Representation

Set the visibility of the representation

public

update()

public
From class StructureRepresentation
public get
public
public
public
public
public
public
public
public
public
private
private
public

attach()

public

clear()

public

create()

public
public
public
public
public
public
public
public
public

init()

public

Set representation parameters

public

Set representation parameters

public

update()

public

Public Constructors

public constructor(structure: Structure, viewer: Viewer, params: StructureRepresentationParameters) source

Create Structure representation object

Override:

StructureRepresentation#constructor

Params:

NameTypeAttributeDescription
structure Structure

the structure object

viewer Viewer

the viewer object

params StructureRepresentationParameters

parameters object

Public Members

public cylinderBuffer source

public parameters source

Override:

StructureRepresentation#parameters

public showAxes source

public showBox source

public sphereBuffer source

public type source

Override:

StructureRepresentation#type

Public Methods

public create() source

Override:

StructureRepresentation#create

public getAxesData() source

public getPrincipalAxes() source

public init() source

Override:

StructureRepresentation#init

public updateData() source

Override:

StructureRepresentation#updateData