ImFusion Web SDK

GlObject

Abstract base class for a renderable OpenGL object that can be hosted in a GlView.

Extends

Methods

MethodDescription
render()Draw the object in 3D space
bounds()Get the axis-aligned bounding box of this GlObject in world space.

Inherited from ClassHandle

MethodDescription
isAliasOf()Returns true if this handle and other alias the same underlying C++ object.
delete()Releases this JavaScript handle.
deleteLater()Schedules this handle for deferred deletion and returns this handle.
isDeleted()Returns true if this handle has already been deleted.
[dispose]()Releases this handle when the enclosing scope exits, so a handle can be declared with using instead of calling delete() later manually.
clone()Returns a new JavaScript handle aliasing the same underlying C++ object.

render()

ts
render(viewState: GlViewState): void;

Draw the object in 3D space

Parameters

ParameterTypeDescription
viewStateGlViewStateCurrent ViewState can be used to query the viewport, modelview, and projection matrix.

Returns

void


bounds()

ts
bounds(): AlignedBox;

Get the axis-aligned bounding box of this GlObject in world space. Return an empty (default-constructed) AlignedBox object if the GlObject does not reside in world space.

Returns

AlignedBox

On this page