Constructor.
viewer object
Optional
theId: stringid of object (if it is not provided - will be generated automatically)
Return object's global RGB color defined as OccViewer.ColorString
Set object's global color or empty string to unset.
Display mode.
Display mode.
Has custom material or not.
Has custom material or not.
Get object id as string.
Return TRUE if object with specified Id exists.
Return TRUE if object with specified Id has deferred data loaded.
Custom material metallic factor 0..1
.
Custom material metallic factor 0..1
.
Get/set translation vector.
Set translation vector.
Get/set properties array of selected objects.
Get/set properties array of selected objects.
Get/set rotation quaternion.
Set rotation quaternion.
Custom material roughness factor 0..1
.
Custom material roughness factor 0..1
.
Scale factor.
Scale factor.
Return object's selectable status.
Set object's selectable status.
Transformation matrix.
Transformation matrix.
Return object's transparency within [0.0, 1.0]
range, or 0.0
if unspecified.
Set object's global transparency within [0.0, 1.0]
range, or 0.0
to unset.
Return object visibility state.
Set object visibility state.
Return view in which object is visible or NULL if it is not displayed or displayed in multiple views.
Set object to be visible only within specific view or all views (NULL) - view affinity. Note that visible still has to be set independently.
Protected
_cloneClone
cloned object
Load deferred mesh data from file previously opened by InteractiveMesh.openUrlAsync or by opening new specified URL. This method load data without displaying.
Optional
theFileUrl: stringthe file URL address to read model from if you want to download model before mesh loading
Optional
theToExpand: booleanexpand model or display as a single part
FALSE if object was not found
Move Object by provided vector.
Open object from loaded file OccViewer.ModelLoader.preloadFile and register presentation(s) in erased state.
path to the file in emulated filesystem
expand model or display as a single part
FALSE on reading error
Open object from the given URL and register presentation(s) in the hidden (erased) state. If Interactive Object was created with empty id, it will be generated from the given URL.
The file will be loaded asynchronously.
Depending on the file format, this method might read only a model structure without geometry - see OccViewer.modelLoader. Warning! Displaying an object with not yet loaded geometry will produce errors!
the file URL address
expand model or display as a single part
FALSE if model cannot be opened
rotate object around given axis.
rotate object around point by provided axis and angle.
Set custom color an specific group of triangles
array of group of triangles and color
flag that tell if current colorized triangles should be replaced.
This class allows to control the model with specified id in the Viewer. It represents OccViewer.InteractiveContext + OccViewer.PropertyManager and OccViewer.ModelLoader wrapper. The model can be existing or not and can be loaded from memory, file or URL. The model can consists from one or many graphical objects which have the same id or starts from the provided id. User should specify id explicitly at construction time. Beware to use unique ids - loading multiple objects with the same id will result in logical issues!
Usual lifetime of the object: