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
closeModel
enablePreLoading
getBoundingBox
getBoundingBoxForPart
getCurrentParticleTraceTime
getCuttingPlaneArray
getCuttingPlaneAt
getDefaultCameraConfig
getFrameInfoArray
getFrameInfoAt
getIsosurfaceArray
getIsosurfaceAt
getIsovolumeArray
getIsovolumeAt
getPartArray
getPartAt
getParticleTraceGroupArray
getParticleTraceGroupAt
getResultInfo
getResultInfoArray
isFirstParticleTraceCycle
openLocalBundle
openModel
openRemoteBundle
rayIntersect
rayIntersectServerInfo
setColorLegendTitle
setCurrentParticleTraceTime
setGuidingCamera
setMasterModelForSyncAnimation
setOneShotDataStreamingCompleteCallback
setProgressHandler
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
- frameIndex (
-
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
- color (
-
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 - name (
-
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
enablePreLoading
-
ConstantRemoteModel.
enablePreLoading
(enable) Arguments: - enable (
boolean
) – None
Return type: void
- enable (
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 - _options (
getBoundingBoxForPart
-
ConstantRemoteModel.
getBoundingBoxForPart
(partIndex) Arguments: - partIndex (
number
) – None
Returns the
BoundingBox
(in world coordinates) of the part at the given index.Return type: BoundingBox - partIndex (
getCuttingPlaneAt
-
ConstantRemoteModel.
getCuttingPlaneAt
(index) Arguments: - index (
number
) – None
Return type: CuttingPlane
- index (
getDefaultCameraConfig
-
ConstantRemoteModel.
getDefaultCameraConfig
() Returns default camera configuration for this model if there is one.
Return type: CameraConfig
getFrameInfoAt
-
ConstantRemoteModel.
getFrameInfoAt
(index) Arguments: - index (
number
) – None
Return type: FrameInfo
- index (
getIsosurfaceAt
-
ConstantRemoteModel.
getIsosurfaceAt
(index) Arguments: - index (
number
) – None
Return type: Isosurface
- index (
getIsovolumeAt
-
ConstantRemoteModel.
getIsovolumeAt
(index) Arguments: - index (
number
) – None
Return type: Isovolume
- index (
getParticleTraceGroupAt
-
ConstantRemoteModel.
getParticleTraceGroupAt
(index) Arguments: - index (
number
) – None
Return type: ParticleTraceGroup
- index (
getResultInfo
-
ConstantRemoteModel.
getResultInfo
(resultType, resultId) Arguments: - resultType (
ResultType
) – None - resultId (
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 - resultType (
getResultInfoArray
-
ConstantRemoteModel.
getResultInfoArray
() Get the array with all ResultInfos defined in this model
Return type: unknown
openLocalBundle
-
ConstantRemoteModel.
openLocalBundle
(modelBundle[, initializationCompleteCallback]) Arguments: - modelBundle (
BinaryModelBundle
) – None - initializationCompleteCallback (
InitializationCompleteCallback
) – optional None
Return type: void
- modelBundle (
openModel
-
ConstantRemoteModel.
openModel
(serverUrl, modelKey[, options[, initializationCompleteCallback]]) Arguments: - serverUrl (
string
) – None - modelKey (
string
) – None - options (
OpenModelOptions
) – optional None - initializationCompleteCallback (
InitializationCompleteCallback
) – optional None
Return type: void
- serverUrl (
openRemoteBundle
-
ConstantRemoteModel.
openRemoteBundle
(bundleUrl[, options[, initializationCompleteCallback]]) Arguments: - bundleUrl (
string
) – None - options (
OpenRemoteBundleOptions
) – optional None - initializationCompleteCallback (
InitializationCompleteCallback
) – optional None
Return type: void
- bundleUrl (
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 - ray (
rayIntersectServerInfo
-
ConstantRemoteModel.
rayIntersectServerInfo
(ray, rayIntersectCallback) Arguments: - ray (
Ray
) – None - rayIntersectCallback (
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 - ray (
setColorLegendTitle
-
ConstantRemoteModel.
setColorLegendTitle
(resultId, title) Arguments: - resultId (
number
) – None - title (
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 - resultId (
setCurrentParticleTraceTime
-
ConstantRemoteModel.
setCurrentParticleTraceTime
(time, isFirstParticleTraceCycle) Arguments: - time (
number
) – None - isFirstParticleTraceCycle (
boolean
) – None
Return type: void
- time (
setGuidingCamera
-
ConstantRemoteModel.
setGuidingCamera
(camera) Arguments: - camera (
Camera
) – None
Return type: void
- camera (
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 - masterModel (
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 - dataStreamingCompleteCallback (
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 - progressHandler (