Class: Viewarea

x3dom. Viewarea

represents a view area

Inheritance

  • Viewarea

Constructor

Viewarea(document, scene)

Constructor.

Parameters:
Name Type Description
document x3dom.X3DDocument the target X3DDocument
scene Object the scene


Properties

Access Name Type Inheritance Description
protected _deltaT Number time passed since last update
protected _eyePos x3dom.fields.SFVec3f eye position of the view area
protected _height Number height of the view area
protected _movement x3dom.fields.SFVec3f movement vector
protected _needNavigationMatrixUpdate Boolean flag to signal a needed NavigationMatrixUpdate
protected _pickingInfo Object picking informations containing pickingpos, pickNorm, pickObj, firstObj, lastObj, lastClickObj, shadowObjId
protected _rotMat x3dom.fields.SFMatrix4f rotation matrix
protected _transMat x3dom.fields.SFMatrix4f translation matrix
protected _width Number width of the view area


Methods

_notifyAffectedPointingSensors(event)

Notifies all pointing device sensors that are currently affected by mouse events, if any, about the given event

Parameters:
Name Type Description
event DOMEvent a mouse event, enriched by X3DOM-specific members

getCCtoWCMatrix() → {x3dom.fields.SFMatrix4f}

Get the clipping coordinates to world coordinates matrix by multiplying the projection and view matrices

Returns:
clipping coordinates to world coordinates matrix

getShadowSplitDepths(numCascades, splitFactor, splitOffset, postProject, mat_proj) → {Array}

Calculate view frustum split positions for the given number of cascades

Parameters:
Name Type Description
numCascades Number the number of cascades
splitFactor Number the splitting factor
splitOffset Number the offset for the splits
postProject Array the post projection something
mat_proj x3dom.fields.SFMatrix4f the projection matrix

Returns:
the post projection something

getViewfrustum(clipMat) → {x3dom.fields.FrustumVolume}

Get the view frustum for a given clipping matrix

Parameters:
Name Type Description
clipMat x3dom.fields.SFMatrix4f the clipping matrix

Returns:
the resulting view frustum

getViewMatrix() → {x3dom.fields.SFMatrix4f}

Get the view areas view matrix

Returns:
view areas view matrix

getViewpointMatrix() → {x3dom.fields.SFMatrix4f}

Get the view areas view point matrix

Returns:
view areas view point matrix

getWCtoCCMatrix() → {x3dom.fields.SFMatrix4f}

Get the world coordinates to clipping coordinates matrix by multiplying the projection and view matrices

Returns:
world coordinates to clipping coordinates matrix

getWCtoLCMatricesPointLight(view, lightNode, mat_proj) → {Array}

Get six WCtoLCMatrices for point light

Parameters:
Name Type Description
view x3dom.fields.SFMatrix4f the view matrix
lightNode x3dom.nodeTypes.X3DNode the light node
mat_proj x3dom.fields.SFMatrix4f the projection matrix

Returns:
six WCtoLCMatrices

hasAnimationStateChanged() → {Boolean}

Returns if the animation state has changed since the last update

Returns:
animation state of view area

isAnimating() → {Boolean}

Returns animation state of view area

Returns:
animation state of view area

isMoving() → {Boolean}

Returns moving state of view are

Returns:
moving state of view area

isMovingOrAnimating() → {Boolean}

is view area moving or animating

Returns:
view area moving or animating state
triggers view area to move to something by passing the timestamp returning a flag if the view area needs a navigation animation

Returns:
flag if the view area need a navigation state

tick(timeStamp) → {Boolean}

Method gets called every frame with the current timestamp

Parameters:
Name Type Description
timeStamp Number current time stamp

Returns:
view area animation state