public class Scene extends A3DObject
getRootNode()
getLibrary()
is used to keep a reference of unattached objects during serialization(like meta data or custom objects) so it can be used as a library.Constructor and Description |
---|
Scene()
Initializes a new instance of the
Scene class. |
Scene(Scene parentScene,
String name)
Initializes a new instance of the
Scene class as a sub-scene. |
Scene(String fileName)
Initializes a new instance of the
Scene class and open the file immediately. |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the scene content and restores the default settings.
|
AnimationClip |
createAnimationClip(String name)
A shorthand function to create and register the
AnimationClip
The first AnimationClip will be assigned to the getCurrentAnimationClip() |
AnimationClip |
getAnimationClip(String name)
Gets a named
AnimationClip |
List<AnimationClip> |
getAnimationClips()
Gets all
AnimationClip defined in the scene. |
AssetInfo |
getAssetInfo()
Gets the top-level asset information
|
AnimationClip |
getCurrentAnimationClip()
Gets the active
AnimationClip |
List<A3DObject> |
getLibrary()
Objects that not directly used in scene hierarchy can be defined in Library.
|
Collection<Pose> |
getPoses()
Gets all
Pose used in this scene. |
Node |
getRootNode()
Gets the root node of the scene.
|
List<Scene> |
getSubScenes()
Gets all sub-scenes
|
void |
open(com.aspose.threed.Stream stream)
Opens the scene from given stream
|
void |
open(com.aspose.threed.Stream stream,
Cancellation cancellationToken)
Opens the scene from given stream
|
void |
open(com.aspose.threed.Stream stream,
FileFormat format)
Opens the scene from given stream using specified file format.
|
void |
open(com.aspose.threed.Stream stream,
FileFormat format,
Cancellation cancellationToken)
Opens the scene from given stream using specified file format.
|
void |
open(com.aspose.threed.Stream stream,
LoadOptions options)
Opens the scene from given stream using specified IO config.
|
void |
open(com.aspose.threed.Stream stream,
LoadOptions options,
Cancellation cancellationToken)
Opens the scene from given stream using specified IO config.
|
void |
open(String fileName)
Opens the scene from given path
|
void |
open(String fileName,
Cancellation cancellationToken)
Opens the scene from given path
|
void |
open(String fileName,
FileFormat format)
Opens the scene from given path using specified file format.
|
void |
open(String fileName,
FileFormat format,
Cancellation cancellationToken)
Opens the scene from given path using specified file format.
|
void |
open(String fileName,
LoadOptions options)
Opens the scene from given path using specified file format.
|
void |
open(String fileName,
LoadOptions options,
Cancellation cancellationToken)
Opens the scene from given path using specified file format.
|
protected void |
reloadSceneAs(FileFormat fmt)
Reload the scene in specified format
|
void |
save(com.aspose.threed.Stream stream,
FileFormat format)
Saves the scene to stream using specified file format.
|
void |
save(com.aspose.threed.Stream stream,
FileFormat format,
Cancellation cancellationToken)
Saves the scene to stream using specified file format.
|
void |
save(com.aspose.threed.Stream stream,
SaveOptions options)
Saves the scene to stream using specified file format.
|
void |
save(com.aspose.threed.Stream stream,
SaveOptions options,
Cancellation cancellationToken)
Saves the scene to stream using specified file format.
|
void |
save(String fileName,
FileFormat format)
Saves the scene to specified path using specified file format.
|
void |
save(String fileName,
FileFormat format,
Cancellation cancellationToken)
Saves the scene to specified path using specified file format.
|
void |
save(String fileName,
SaveOptions options)
Saves the scene to specified path using specified file format.
|
void |
save(String fileName,
SaveOptions options,
Cancellation cancellationToken)
Saves the scene to specified path using specified file format.
|
void |
setAssetInfo(AssetInfo value)
Sets the top-level asset information
|
void |
setCurrentAnimationClip(AnimationClip value)
Sets the active
AnimationClip |
findProperty, getName, getProperty, removeProperty, removeProperty, setName, setProperty
public static final String VERSION
public Scene()
Scene
class.public Scene(Scene parentScene, String name)
Scene
class as a sub-scene.parentScene
- The parent scene.name
- Scene's name.public Scene(String fileName) throws IOException
Scene
class and open the file immediately.fileName
- File's name to open.IOException
public List<A3DObject> getLibrary()
public List<AnimationClip> getAnimationClips()
AnimationClip
defined in the scene.public AnimationClip getCurrentAnimationClip()
AnimationClip
public void setCurrentAnimationClip(AnimationClip value)
AnimationClip
value
- New valuepublic AnimationClip getAnimationClip(String name)
AnimationClip
name
- The AnimationClip
's name to look uppublic AssetInfo getAssetInfo()
public void setAssetInfo(AssetInfo value)
value
- New valuepublic Collection<Pose> getPoses()
Pose
used in this scene.public Node getRootNode()
public void clear()
public AnimationClip createAnimationClip(String name)
AnimationClip
The first AnimationClip
will be assigned to the getCurrentAnimationClip()
name
- Animation clip's nameprotected void reloadSceneAs(FileFormat fmt) throws IOException
fmt
- IOException
public void open(com.aspose.threed.Stream stream, FileFormat format, Cancellation cancellationToken) throws ImportException
stream
- Input stream, user is responsible for closing the stream.format
- File format.cancellationToken
- Cancellation token to the load taskImportException
public void open(com.aspose.threed.Stream stream, FileFormat format) throws ImportException
stream
- Input stream, user is responsible for closing the stream.format
- File format.ImportException
public void open(com.aspose.threed.Stream stream, LoadOptions options, Cancellation cancellationToken) throws ImportException
stream
- Input stream, user is responsible for closing the stream.options
- More detailed configuration to open the stream.cancellationToken
- Cancellation token to the load taskImportException
public void open(com.aspose.threed.Stream stream, LoadOptions options) throws ImportException
stream
- Input stream, user is responsible for closing the stream.options
- More detailed configuration to open the stream.ImportException
public void open(com.aspose.threed.Stream stream, Cancellation cancellationToken) throws IOException
stream
- Input stream, user is responsible for closing the stream.cancellationToken
- Cancellation token to the load taskIOException
public void open(com.aspose.threed.Stream stream) throws IOException
stream
- Input stream, user is responsible for closing the stream.IOException
public void open(String fileName, FileFormat format, Cancellation cancellationToken) throws IOException
fileName
- File name.format
- File format.cancellationToken
- Cancellation token to the load taskIOException
public void open(String fileName, FileFormat format) throws IOException
fileName
- File name.format
- File format.IOException
public void open(String fileName, LoadOptions options, Cancellation cancellationToken) throws IOException
fileName
- File name.options
- More detailed configuration to open the stream.cancellationToken
- Cancellation token to the load taskIOException
public void open(String fileName, LoadOptions options) throws IOException
fileName
- File name.options
- More detailed configuration to open the stream.IOException
public void open(String fileName, Cancellation cancellationToken) throws IOException
fileName
- File name.cancellationToken
- Cancellation token to the load taskIOException
public void open(String fileName) throws IOException
fileName
- File name.IOException
public void save(com.aspose.threed.Stream stream, FileFormat format, Cancellation cancellationToken) throws ExportException
stream
- Input stream, user is responsible for closing the stream.format
- Format.cancellationToken
- Cancellation token to the save taskExportException
public void save(com.aspose.threed.Stream stream, FileFormat format) throws ExportException
stream
- Input stream, user is responsible for closing the stream.format
- Format.ExportException
public void save(com.aspose.threed.Stream stream, SaveOptions options, Cancellation cancellationToken) throws ExportException
stream
- Input stream, user is responsible for closing the stream.options
- More detailed configuration to save the stream.cancellationToken
- Cancellation token to the save taskExportException
public void save(com.aspose.threed.Stream stream, SaveOptions options) throws ExportException
stream
- Input stream, user is responsible for closing the stream.options
- More detailed configuration to save the stream.ExportException
public void save(String fileName, FileFormat format, Cancellation cancellationToken) throws IOException
fileName
- File name.format
- Format.cancellationToken
- Cancellation token to the save taskIOException
public void save(String fileName, FileFormat format) throws IOException
fileName
- File name.format
- Format.IOException
public void save(String fileName, SaveOptions options, Cancellation cancellationToken) throws IOException
fileName
- File name.options
- More detailed configuration to save the stream.cancellationToken
- Cancellation token to the save taskIOException
public void save(String fileName, SaveOptions options) throws IOException
fileName
- File name.options
- More detailed configuration to save the stream.IOException
Copyright © 2019. All rights reserved.