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
Accessors
Methods
Constructors
- ConstantRemoteModel.constructor()
Creates a ConstantRemoteModel.
- Return type:
ConstantRemoteModel
Accessors
- ConstantRemoteModel.animation()
The animation control for this ConstantRemoteModel
- Return type:
Animation
- ConstantRemoteModel.currentFrameIndex()
The frame to show
The given zero-based index must be between 0 and
frameCount
- 1.- Return type:
number
- ConstantRemoteModel.currentFrameIndex(frameIndex)
- Arguments:
frameIndex (
number
) – None
- Return type:
void
- ConstantRemoteModel.cuttingPlaneCount()
- Return type:
number
- ConstantRemoteModel.frameCount()
- Return type:
number
- ConstantRemoteModel.isosurfaceCount()
- Return type:
number
- ConstantRemoteModel.isovolumeCount()
- Return type:
number
- ConstantRemoteModel.meshColor()
The color of the element mesh on the surface of the part
- Return type:
Color3Like
- ConstantRemoteModel.meshColor(color)
- Arguments:
color (
Color3Like
) – None
- Return type:
void
- 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.
- Return type:
ModelSpec
- ConstantRemoteModel.name()
Name of the model.
Mainly used for debugging.
- Return type:
string
- ConstantRemoteModel.name(name)
- Arguments:
name (
string
) – None
Name of the model.
Mainly used for debugging.
- Return type:
void
- ConstantRemoteModel.partCount()
Returns the number of parts in this model
- Return type:
number
- ConstantRemoteModel.particleTraceGroup()
- Return type:
number
- 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
- Return type:
SimulationInfo
Methods
closeModel
- ConstantRemoteModel.closeModel()
- Return type:
void
enablePreLoading
- ConstantRemoteModel.enablePreLoading(enable)
- Arguments:
enable (
boolean
) – None
- Return type:
void
getBoundingBox
- ConstantRemoteModel.getBoundingBox([_options])
- Arguments:
_options (
ModelBoundingBoxOptions
) – optional None
Returns the
BoundingBox
(in world coordinates) of the current contents of the modelNote that currently this method does not support any
ModelBoundingBoxOptions
- Return type:
BoundingBox
getBoundingBoxForPart
- ConstantRemoteModel.getBoundingBoxForPart(partIndex)
- Arguments:
partIndex (
number
) – None
Returns the
BoundingBox
(in world coordinates) of the part at the given index.- Return type:
BoundingBox
getCurrentParticleTraceTime
- ConstantRemoteModel.getCurrentParticleTraceTime()
- Return type:
number
getCuttingPlaneArray
- ConstantRemoteModel.getCuttingPlaneArray()
- Return type:
unknown
getCuttingPlaneAt
- ConstantRemoteModel.getCuttingPlaneAt(index)
- Arguments:
index (
number
) – None
- Return type:
CuttingPlane
getDefaultCameraConfig
- ConstantRemoteModel.getDefaultCameraConfig()
Returns default camera configuration for this model if there is one.
- Return type:
CameraConfig
getFrameInfoArray
- ConstantRemoteModel.getFrameInfoArray()
- Return type:
unknown
getFrameInfoAt
- ConstantRemoteModel.getFrameInfoAt(index)
- Arguments:
index (
number
) – None
- Return type:
FrameInfo
getIsosurfaceArray
- ConstantRemoteModel.getIsosurfaceArray()
- Return type:
unknown
getIsosurfaceAt
- ConstantRemoteModel.getIsosurfaceAt(index)
- Arguments:
index (
number
) – None
- Return type:
Isosurface
getIsovolumeArray
- ConstantRemoteModel.getIsovolumeArray()
- Return type:
unknown
getIsovolumeAt
- ConstantRemoteModel.getIsovolumeAt(index)
- Arguments:
index (
number
) – None
- Return type:
Isovolume
getPartArray
- ConstantRemoteModel.getPartArray()
- Return type:
unknown
getPartAt
- ConstantRemoteModel.getPartAt(index)
- Arguments:
index (
number
) – None
- Return type:
Part
getParticleTraceGroupArray
- ConstantRemoteModel.getParticleTraceGroupArray()
- Return type:
unknown
getParticleTraceGroupAt
- ConstantRemoteModel.getParticleTraceGroupAt(index)
- Arguments:
index (
number
) – None
- Return type:
ParticleTraceGroup
getResultInfo
- ConstantRemoteModel.getResultInfo(resultType, resultId)
- Arguments:
resultType (
ResultType
) – NoneresultId (
number
) – None
Get the information about the result with the given type and id.
Returns null if the result was not found.
- Return type:
ResultInfo
getResultInfoArray
- ConstantRemoteModel.getResultInfoArray()
Get the array with all ResultInfos defined in this model
- Return type:
unknown
isFirstParticleTraceCycle
- ConstantRemoteModel.isFirstParticleTraceCycle()
- Return type:
boolean
openLocalBundle
- ConstantRemoteModel.openLocalBundle(modelBundle[, initializationCompleteCallback])
- Arguments:
modelBundle (
BinaryModelBundle
) – NoneinitializationCompleteCallback (
InitializationCompleteCallback
) – optional None
- Return type:
void
openModel
- ConstantRemoteModel.openModel(serverUrl, modelKey[, options[, initializationCompleteCallback]])
- Arguments:
serverUrl (
string
) – NonemodelKey (
string
) – Noneoptions (
OpenModelOptions
) – optional NoneinitializationCompleteCallback (
InitializationCompleteCallback
) – optional None
- Return type:
void
openRemoteBundle
- ConstantRemoteModel.openRemoteBundle(bundleUrl[, options[, initializationCompleteCallback]])
- Arguments:
bundleUrl (
string
) – Noneoptions (
OpenRemoteBundleOptions
) – optional NoneinitializationCompleteCallback (
InitializationCompleteCallback
) – optional None
- Return type:
void
rayIntersect
- ConstantRemoteModel.rayIntersect(ray)
- Arguments:
ray (
Ray
) – None
Performs picking on the model using the current frame.
If something was hit, returns a HitItem containing information about the object that was hit. Returns null if nothing was hit.
- Return type:
HitItem
rayIntersectServerInfo
- ConstantRemoteModel.rayIntersectServerInfo(ray, rayIntersectCallback)
- Arguments:
ray (
Ray
) – NonerayIntersectCallback (
RayIntersectCallback
) – None
Performs picking on the model using the current frame, querying the server for additional info
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
- Return type:
void
setColorLegendTitle
- ConstantRemoteModel.setColorLegendTitle(resultId, title)
- Arguments:
resultId (
number
) – Nonetitle (
string
) – None
Set the title of the color legend with the given result Id
This will update any current legends, and also be used as the title whenever the legend is later created.
- Return type:
void
setCurrentParticleTraceTime
- ConstantRemoteModel.setCurrentParticleTraceTime(time, isFirstParticleTraceCycle)
- Arguments:
time (
number
) – NoneisFirstParticleTraceCycle (
boolean
) – None
- Return type:
void
setGuidingCamera
- ConstantRemoteModel.setGuidingCamera(camera)
- Arguments:
camera (
Camera
) – None
- Return type:
void
setMasterModelForSyncAnimation
- ConstantRemoteModel.setMasterModelForSyncAnimation(masterModel)
- Arguments:
masterModel (
ConstantRemoteModel
) – None
Set a master model to which animation in this model will be synchronized.
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.
- Return type:
void
setOneShotDataStreamingCompleteCallback
- ConstantRemoteModel.setOneShotDataStreamingCompleteCallback(dataStreamingCompleteCallback)
- Arguments:
dataStreamingCompleteCallback (
DataStreamingCompleteCallback
) – None
Sets a one- shot callback that will be called the next time we observe that data streaming is complete
- Return type:
void
setProgressHandler
- ConstantRemoteModel.setProgressHandler(progressHandler)
- Arguments:
progressHandler (
ProgressHandler
) – None
Sets a handler function that will be called whenever when new progress data is available
- Return type:
void