ConstantRemoteModel

class cee.cug.ConstantRemoteModel()

A constant remote model designed for viewing CAE models with a stateless, scalable server.

The ConstantRemoteModel supports an efficient and scalable streaming of pre-defined CAE model configurations. The server is a stateless REST API based server that has very low resource usage on the server side and is easy to load balance. The streaming also starts immediately when a model is opened, no matter the size of the model. Similar to RemoteModel, it utilizes 3D Progressive Object Streaming to the client. The model needs to be converted into a CUG database format before it can be streamed. This is done with the included CugComposer command line utility.

The ConstantRemoteModel is used in the viewer on Ceetron Cloud.

See the example in Examples/BuildYourFirstApp/2-Viewer for how to use the ConstantRemoteModel.

Constructors


Constructors

constructor

cee.cug.ConstantRemoteModel.constructor()

Creates a ConstantRemoteModel.

Return type

cee.cug.ConstantRemoteModel

Accessors

cee.cug.ConstantRemoteModel.animation

The animation control for this ConstantRemoteModel

cee.cug.ConstantRemoteModel.currentFrameIndex

The frame to show

The given zero-based index must be between 0 and frameCount - 1.

cee.cug.ConstantRemoteModel.cuttingPlaneCount
cee.cug.ConstantRemoteModel.frameCount
cee.cug.ConstantRemoteModel.isosurfaceCount
cee.cug.ConstantRemoteModel.isovolumeCount
cee.cug.ConstantRemoteModel.meshColor

The color of the element mesh on the surface of the part

cee.cug.ConstantRemoteModel.modelSpec

Returns the ModelSpec describing the result used in this model

Might return null if model is not streamed yet or the model does not have result info.

cee.cug.ConstantRemoteModel.name

Name of the model.

Mainly used for debugging.

cee.cug.ConstantRemoteModel.partCount

Returns the number of parts in this model

cee.cug.ConstantRemoteModel.particleTraceGroup
cee.cug.ConstantRemoteModel.simulationInfo

Returns the SimulationInfo describing the simulation that is the source for this model.

Might return null if model is not streamed yet or the model does not have simulation info

Methods

closeModel

cee.cug.ConstantRemoteModel.closeModel()
Return type

void

enablePreLoading

cee.cug.ConstantRemoteModel.enablePreLoading(enable)
Arguments
  • enable (boolean) –

Return type

void

getBoundingBox

cee.cug.ConstantRemoteModel.getBoundingBox()

Returns the BoundingBox (in world coordinates) of the current contents of the model

Return type

cee.BoundingBox

getBoundingBoxForPart

cee.cug.ConstantRemoteModel.getBoundingBoxForPart(partIndex)

Returns the BoundingBox (in world coordinates) of the part at the given index.

Arguments
  • partIndex (number) –

Return type

cee.BoundingBox

getCurrentParticleTraceTime

cee.cug.ConstantRemoteModel.getCurrentParticleTraceTime()
Return type

number

getCuttingPlaneArray

cee.cug.ConstantRemoteModel.getCuttingPlaneArray()
Return type

ReadonlyArray[cee.cug.CuttingPlane]

getCuttingPlaneAt

cee.cug.ConstantRemoteModel.getCuttingPlaneAt(index)
Arguments
  • index (number) –

Return type

cee.cug.CuttingPlane

getFrameInfoArray

cee.cug.ConstantRemoteModel.getFrameInfoArray()
Return type

ReadonlyArray[cee.cug.FrameInfo]

getFrameInfoAt

cee.cug.ConstantRemoteModel.getFrameInfoAt(index)
Arguments
  • index (number) –

Return type

cee.cug.FrameInfo

getIsosurfaceArray

cee.cug.ConstantRemoteModel.getIsosurfaceArray()
Return type

ReadonlyArray[cee.cug.Isosurface]

getIsosurfaceAt

cee.cug.ConstantRemoteModel.getIsosurfaceAt(index)
Arguments
  • index (number) –

Return type

cee.cug.Isosurface

getIsovolumeArray

cee.cug.ConstantRemoteModel.getIsovolumeArray()
Return type

ReadonlyArray[cee.cug.Isovolume]

getIsovolumeAt

cee.cug.ConstantRemoteModel.getIsovolumeAt(index)
Arguments
  • index (number) –

Return type

cee.cug.Isovolume

getPartArray

cee.cug.ConstantRemoteModel.getPartArray()
Return type

ReadonlyArray[cee.cug.Part]

getPartAt

cee.cug.ConstantRemoteModel.getPartAt(index)
Arguments
  • index (number) –

Return type

cee.cug.Part

getParticleTraceGroupArray

cee.cug.ConstantRemoteModel.getParticleTraceGroupArray()
Return type

ReadonlyArray[cee.cug.ParticleTraceGroup]

getParticleTraceGroupAt

cee.cug.ConstantRemoteModel.getParticleTraceGroupAt(index)
Arguments
  • index (number) –

Return type

cee.cug.ParticleTraceGroup

getResultInfo

cee.cug.ConstantRemoteModel.getResultInfo(resultType, resultId)

Get the information about the result with the given type and id.

Arguments
  • resultType (cee.cug.ResultType) –

  • resultId (number) –

Return type

cee.cug.ResultInfo

Returns null if the result was not found.

getResultInfoArray

cee.cug.ConstantRemoteModel.getResultInfoArray()

Get the array with all ResultInfos defined in this model

Return type

ReadonlyArray[cee.cug.ResultInfo]

isFirstParticleTraceCycle

cee.cug.ConstantRemoteModel.isFirstParticleTraceCycle()
Return type

boolean

openLocalBundle

cee.cug.ConstantRemoteModel.openLocalBundle(modelBundle, initializationCompleteCallback)
Arguments
Return type

void

openModel

cee.cug.ConstantRemoteModel.openModel(serverUrl, modelKey, options, initializationCompleteCallback)
Arguments
Return type

void

openRemoteBundle

cee.cug.ConstantRemoteModel.openRemoteBundle(bundleUrl, options, initializationCompleteCallback)
Arguments
Return type

void

rayIntersect

cee.cug.ConstantRemoteModel.rayIntersect(ray)

Performs picking on the model using the current frame.

Arguments
  • ray (cee.Ray) –

Return type

cee.cug.HitItem

If something was hit, returns a HitItem containing information about the object that was hit. Returns null if nothing was hit.

rayIntersectServerInfo

cee.cug.ConstantRemoteModel.rayIntersectServerInfo(ray, rayIntersectCallback)

Performs picking on the model using the current frame, querying the server for additional info

Arguments
Return type

void

If something was hit, returns a HitItem containing information about the object that was hit. Returns null if nothing was hit.

This method will query the CUG server for additional info on the selected item

setCurrentParticleTraceTime

cee.cug.ConstantRemoteModel.setCurrentParticleTraceTime(time, isFirstParticleTraceCycle)
Arguments
  • time (number) –

  • isFirstParticleTraceCycle (boolean) –

Return type

void

setGuidingCamera

cee.cug.ConstantRemoteModel.setGuidingCamera(camera)
Arguments
  • camera (cee.Camera) –

Return type

void

setMasterModelForSyncAnimation

cee.cug.ConstantRemoteModel.setMasterModelForSyncAnimation(masterModel)

Set a master model to which animation in this model will be synchronized.

Arguments
Return type

void

Calling this function will make this model a slave of masterModel with regards to animations. This means that animations will be controlled via the master model’s animation control and that this model’s animation control become invalid. To set this model back to normal operation, pass null to this function.

setOneShotDataStreamingCompleteCallback

cee.cug.ConstantRemoteModel.setOneShotDataStreamingCompleteCallback(dataStreamingCompleteCallback)

Sets a one- shot callback that will be called the next time we observe that data streaming is complete

Arguments
Return type

void

setProgressHandler

cee.cug.ConstantRemoteModel.setProgressHandler(progressHandler)

Sets a handler function that will be called whenever when new progress data is available

Arguments
Return type

void