NGL@0.10.4 Home Manual Reference Source GalleryRepository
import SurfaceRepresentation from 'ngl/src/representation/surface-representation.js'
public class | source

SurfaceRepresentation

Extends:

Representation → SurfaceRepresentation

Surface representation

Constructor Summary

Public Constructor
public

Create Surface representation object

Method Summary

Public Methods
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(surface: Surface | Volume, viewer: Viewer, params: SurfaceRepresentationParameters) source

Create Surface representation object

Params:

NameTypeAttributeDescription
surface Surface | Volume

the surface or volume to be represented

viewer Viewer

a viewer object

params SurfaceRepresentationParameters

surface representation parameters

Public Methods

public setParameters(params: SurfaceRepresentationParameters, what: Object, rebuild: Boolean): SurfaceRepresentation source

Set representation parameters

Override:

Representation#setParameters

Params:

NameTypeAttributeDescription
params SurfaceRepresentationParameters

surface 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:

SurfaceRepresentation

this object