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.
Index
Constructors
Accessors
animationcurrentFrameIndexcuttingPlaneCountframeCountisosurfaceCountisovolumeCountmeshColormodelSpecnamepartCountparticleTraceGroupsimulationInfo
Methods
closeModelenablePreLoadinggetBoundingBoxgetBoundingBoxForPartgetCurrentParticleTraceTimegetCuttingPlaneArraygetCuttingPlaneAtgetDefaultCameraConfiggetFrameInfoArraygetFrameInfoAtgetIsosurfaceArraygetIsosurfaceAtgetIsovolumeArraygetIsovolumeAtgetPartArraygetPartAtgetParticleTraceGroupArraygetParticleTraceGroupAtgetResultInfogetResultInfoArrayisFirstParticleTraceCycleopenLocalBundleopenModelopenRemoteBundlerayIntersectrayIntersectServerInfosetColorLegendTitlesetCurrentParticleTraceTimesetGuidingCamerasetMasterModelForSyncAnimationsetOneShotDataStreamingCompleteCallbacksetProgressHandler
Constructors
-
cee.cug.ConstantRemoteModel.constructor() - ConstantRemoteModel():
ConstantRemoteModelCreates a ConstantRemoteModel.
Returns:
ConstantRemoteModel
Accessors
-
cee.cug.ConstantRemoteModel.animation() - get animation():
AnimationThe animation control for this ConstantRemoteModel
Returns:
Animation
-
cee.cug.ConstantRemoteModel.currentFrameIndex() - get currentFrameIndex(): number
The frame to show
The given zero-based index must be between 0 and
frameCount- 1.Returns: number
set currentFrameIndex(frameIndex: number): voidParameters
frameIndex: numberReturns: void
-
cee.cug.ConstantRemoteModel.cuttingPlaneCount() - get cuttingPlaneCount(): number
Returns: number
-
cee.cug.ConstantRemoteModel.frameCount() - get frameCount(): number
Returns: number
-
cee.cug.ConstantRemoteModel.isosurfaceCount() - get isosurfaceCount(): number
Returns: number
-
cee.cug.ConstantRemoteModel.isovolumeCount() - get isovolumeCount(): number
Returns: number
-
cee.cug.ConstantRemoteModel.meshColor() - get meshColor():
Color3LikeThe color of the element mesh on the surface of the part
Returns:
Color3Likeset meshColor(color:Color3Like): voidParameters
color:Color3LikeReturns: void
-
cee.cug.ConstantRemoteModel.modelSpec() - get modelSpec():
ModelSpecReturns 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.
Returns:
ModelSpec
-
cee.cug.ConstantRemoteModel.name() Name of the model.
Mainly used for debugging.
get name(): stringName of the model.
Mainly used for debugging.
Returns: string
set name(name: string): voidName of the model.
Mainly used for debugging.
Parameters
name: stringReturns: void
-
cee.cug.ConstantRemoteModel.partCount() - get partCount(): number
Returns the number of parts in this model
Returns: number
-
cee.cug.ConstantRemoteModel.particleTraceGroup() - get particleTraceGroup(): number
Returns: number
-
cee.cug.ConstantRemoteModel.simulationInfo() - get simulationInfo():
SimulationInfoReturns 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
Returns:
SimulationInfo
Methods
-
cee.cug.ConstantRemoteModel.closeModel() - closeModel(): void
Returns: void
-
cee.cug.ConstantRemoteModel.enablePreLoading() - enablePreLoading(enable: boolean): void
Parameters
enable: booleanReturns: void
-
cee.cug.ConstantRemoteModel.getBoundingBox() - getBoundingBox(_options:
ModelBoundingBoxOptions):BoundingBoxReturns the
BoundingBox(in world coordinates) of the current contents of the modelNote that currently this method does not support any
ModelBoundingBoxOptionsParameters
_options:ModelBoundingBoxOptionsReturns:
BoundingBox
-
cee.cug.ConstantRemoteModel.getBoundingBoxForPart() - getBoundingBoxForPart(partIndex: number):
BoundingBoxReturns the
BoundingBox(in world coordinates) of the part at the given index.Parameters
partIndex: numberReturns:
BoundingBox
-
cee.cug.ConstantRemoteModel.getCurrentParticleTraceTime() - getCurrentParticleTraceTime(): number
Returns: number
-
cee.cug.ConstantRemoteModel.getCuttingPlaneArray() - getCuttingPlaneArray(): readonly
CuttingPlane[]Returns: readonly
CuttingPlane[]
-
cee.cug.ConstantRemoteModel.getCuttingPlaneAt() - getCuttingPlaneAt(index: number):
CuttingPlaneParameters
index: numberReturns:
CuttingPlane
-
cee.cug.ConstantRemoteModel.getDefaultCameraConfig() - getDefaultCameraConfig():
CameraConfigReturns default camera configuration for this model if there is one.
Returns:
CameraConfig
-
cee.cug.ConstantRemoteModel.getFrameInfoArray() - getFrameInfoArray(): readonly
FrameInfo[]Returns: readonly
FrameInfo[]
-
cee.cug.ConstantRemoteModel.getFrameInfoAt() - getFrameInfoAt(index: number):
FrameInfoParameters
index: numberReturns:
FrameInfo
-
cee.cug.ConstantRemoteModel.getIsosurfaceArray() - getIsosurfaceArray(): readonly
Isosurface[]Returns: readonly
Isosurface[]
-
cee.cug.ConstantRemoteModel.getIsosurfaceAt() - getIsosurfaceAt(index: number):
IsosurfaceParameters
index: numberReturns:
Isosurface
-
cee.cug.ConstantRemoteModel.getIsovolumeArray() - getIsovolumeArray(): readonly
Isovolume[]Returns: readonly
Isovolume[]
-
cee.cug.ConstantRemoteModel.getIsovolumeAt() - getIsovolumeAt(index: number):
IsovolumeParameters
index: numberReturns:
Isovolume
-
cee.cug.ConstantRemoteModel.getPartArray() - getPartArray(): readonly
Part[]Returns: readonly
Part[]
-
cee.cug.ConstantRemoteModel.getPartAt() - getPartAt(index: number):
PartParameters
index: numberReturns:
Part
-
cee.cug.ConstantRemoteModel.getParticleTraceGroupArray() - getParticleTraceGroupArray(): readonly
ParticleTraceGroup[]Returns: readonly
ParticleTraceGroup[]
-
cee.cug.ConstantRemoteModel.getParticleTraceGroupAt() - getParticleTraceGroupAt(index: number):
ParticleTraceGroupParameters
index: numberReturns:
ParticleTraceGroup
-
cee.cug.ConstantRemoteModel.getResultInfo() - getResultInfo(resultType:
ResultType, resultId: number):ResultInfoGet the information about the result with the given type and id.
Returns null if the result was not found.
Parameters
resultType:
ResultTyperesultId: number
Returns:
ResultInfo
-
cee.cug.ConstantRemoteModel.getResultInfoArray() - getResultInfoArray(): readonly
ResultInfo[]Get the array with all ResultInfos defined in this model
Returns: readonly
ResultInfo[]
-
cee.cug.ConstantRemoteModel.isFirstParticleTraceCycle() - isFirstParticleTraceCycle(): boolean
Returns: boolean
-
cee.cug.ConstantRemoteModel.openLocalBundle() - openLocalBundle(modelBundle:
BinaryModelBundle, initializationCompleteCallback:InitializationCompleteCallback): voidParameters
modelBundle:
BinaryModelBundleinitializationCompleteCallback:
InitializationCompleteCallbackReturns: void
-
cee.cug.ConstantRemoteModel.openModel() - openModel(serverUrl: string, modelKey: string, options:
OpenModelOptions, initializationCompleteCallback:InitializationCompleteCallback): voidParameters
serverUrl: string
modelKey: string
options:
OpenModelOptionsinitializationCompleteCallback:
InitializationCompleteCallbackReturns: void
-
cee.cug.ConstantRemoteModel.openRemoteBundle() - openRemoteBundle(bundleUrl: string, options:
OpenRemoteBundleOptions, initializationCompleteCallback:InitializationCompleteCallback): voidParameters
bundleUrl: string
options:
OpenRemoteBundleOptionsinitializationCompleteCallback:
InitializationCompleteCallbackReturns: void
-
cee.cug.ConstantRemoteModel.rayIntersect() -
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.
Parameters
ray:RayReturns:
HitItem
-
cee.cug.ConstantRemoteModel.rayIntersectServerInfo() - rayIntersectServerInfo(ray:
Ray, rayIntersectCallback:RayIntersectCallback): voidPerforms 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
Parameters
ray:
RayrayIntersectCallback:
RayIntersectCallbackReturns: void
-
cee.cug.ConstantRemoteModel.setColorLegendTitle() - setColorLegendTitle(resultId: number, title: string): void
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.
Parameters
resultId: number
title: string
Returns: void
-
cee.cug.ConstantRemoteModel.setCurrentParticleTraceTime() - setCurrentParticleTraceTime(time: number, isFirstParticleTraceCycle: boolean): void
Parameters
time: number
isFirstParticleTraceCycle: boolean
Returns: void
-
cee.cug.ConstantRemoteModel.setGuidingCamera() - setGuidingCamera(camera:
Camera): voidParameters
camera:CameraReturns: void
-
cee.cug.ConstantRemoteModel.setMasterModelForSyncAnimation() - setMasterModelForSyncAnimation(masterModel:
ConstantRemoteModel): voidSet 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.
Parameters
masterModel:ConstantRemoteModelReturns: void
-
cee.cug.ConstantRemoteModel.setOneShotDataStreamingCompleteCallback() - setOneShotDataStreamingCompleteCallback(dataStreamingCompleteCallback:
DataStreamingCompleteCallback): voidSets a one- shot callback that will be called the next time we observe that data streaming is complete
Parameters
dataStreamingCompleteCallback:DataStreamingCompleteCallbackReturns: void
-
cee.cug.ConstantRemoteModel.setProgressHandler() - setProgressHandler(progressHandler:
ProgressHandler): voidSets a handler function that will be called whenever when new progress data is available
Parameters
progressHandler:ProgressHandlerReturns: void