ImFusion Web SDK

GlViewState

Encapsulates the OpenGL view state defined by the viewport, a projection matrix and a model-view matrix.

Extends

Methods

MethodDescription
viewport()Returns the active viewport of the View we render to.
projectionMatrix()Returns the projection matrix.
modelViewMatrix()Returns the model-view matrix.
modelViewProjectionMatrix()Returns the full model-view-projection matrix.

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.

viewport()

ts
viewport(): GlViewport;

Returns the active viewport of the View we render to.

Returns

GlViewport


projectionMatrix()

ts
projectionMatrix(): mat4;

Returns the projection matrix.

Returns

mat4


modelViewMatrix()

ts
modelViewMatrix(): mat4;

Returns the model-view matrix. Computes OpenGL view coordinates from world coordinates.

Returns

mat4


modelViewProjectionMatrix()

ts
modelViewProjectionMatrix(): mat4;

Returns the full model-view-projection matrix.

Returns

mat4

On this page