NGL@0.10.4 Home Manual Reference Source GalleryRepository
import StructureRepresentation from 'ngl/src/representation/structure-representation.js'
public interface | source

StructureRepresentation

Extends:

Representation → StructureRepresentation

Structure representation

Constructor Summary

Public Constructor
public

Create Structure representation object

Member Summary

Public Members
public
public

Method Summary

Public Methods
public

Set representation parameters

public

Set representation parameters

Inherited Summary

From class Representation
public

tasks: *

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

public

viewer: *

public

Set the visibility of the representation

public

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

Set the visibility of the representation

Public Constructors

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

Create Structure representation object

Params:

NameTypeAttributeDescription
structure Structure

the structure to be represented

viewer Viewer

a viewer object

params StructureRepresentationParameters

structure representation parameters

Public Members

public structure: * source

public structureView: * source

Public Methods

public setParameters(params: StructureRepresentationParameters, what: Object, rebuild: Boolean): StructureRepresentation source

Set representation parameters

Override:

Representation#setParameters

Params:

NameTypeAttributeDescription
params StructureRepresentationParameters

structure parameter object

what Object
  • optional

buffer data attributes to be updated, note that this needs to be implemented in the derived classes. Generally it allows more fine-grained control over updating than forcing a rebuild.

what.position Boolean

update position data

what.color Boolean

update color data

rebuild Boolean
  • optional

whether or not to rebuild the representation

Return:

StructureRepresentation

this object

public setSelection(string: String, silent: Boolean): StructureRepresentation source

Set representation parameters

Params:

NameTypeAttributeDescription
string String

selection string, see {@tutorial selection-language}

silent Boolean
  • optional

don't trigger a change event in the selection

Return:

StructureRepresentation

this object