Load a model file
| <viz>.addChild( | |
| filename | |
| parent = viz.WORLD | |
| scene = viz.MainScene | |
| rotate = viz.AUTO_COMPUTE | |
| cache = viz.CACHE_DEFAULT |
)
filename
Filename of model
parent = viz.WORLD
viz.WORLD
viz.SCREEN
viz.HEAD
viz.ORTHO
<node3d> object
scene = viz.MainScene
If the parent is viz.WORLD, viz.SCREEN, or viz.HEAD, then the argument represents the scene to add the object to.
If the parent is viz.ORTHO, then the argument represents the window to add the object to.
If the parent is a valid node3d object, then the argument is ignored.
rotate = viz.AUTO_COMPUTE
Specifies which coordinate frame to rotate the model from. Can be one of the following values:
Rotate mode |
|
viz.AUTO_COMPUTE |
Automatically detect the coordinate frame based on the file type. |
viz.ROTATE_NONE |
Do not rotate the model. |
viz.ROTATE_Y_UP |
Rotate the model from a Y-up coordinate frame. |
viz.ROTATE_Z_UP |
Rotate the model from a Z-up coordinate frame. |
cache = viz.CACHE_DEFAULT
One of the following cache modes:
Cache mode |
|
viz.CACHE_DEFAULT |
Use the default cache mode specified in the 'viz.model.cache' option. The default value of the option is viz.CACHE_NONE. |
viz.CACHE_NONE |
Do not use the cache and load the model from disk. |
viz.CACHE_COPY |
If the file has been loaded, return a copy, otherwise add the loaded model to the cache. |
viz.CACHE_CLONE |
If the file has been loaded, return a clone, otherwise add the loaded model to the cache. |
The cordinate [0,0,0] for a child object is the center of it's parent object.
<node3d> object.