public class Scene extends SceneObject
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.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VERSION |
name, properties| Constructor and Description |
|---|
Scene()
Initializes a new instance of the
Scene class. |
Scene(Entity entity)
Initializes a new instance of the
Scene class with an entity attached to a new node. |
Scene(Scene parentScene,
java.lang.String name)
Initializes a new instance of the
Scene class as a sub-scene. |
Scene(java.lang.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(java.lang.String name)
A shorthand function to create and register the
AnimationClip
The first AnimationClip will be assigned to the getCurrentAnimationClip() |
AnimationClip |
getAnimationClip(java.lang.String name)
Gets a named
AnimationClip |
java.util.List<AnimationClip> |
getAnimationClips()
Gets all
AnimationClip defined in the scene. |
AssetInfo |
getAssetInfo()
Gets the top-level asset information
|
AnimationClip |
getCurrentAnimationClip()
Gets the active
AnimationClip |
java.util.List<A3DObject> |
getLibrary()
Objects that not directly used in scene hierarchy can be defined in Library.
|
java.util.Collection<Pose> |
getPoses()
Gets all
Pose used in this scene. |
Node |
getRootNode()
Gets the root node of the scene.
|
java.util.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(java.lang.String fileName)
Opens the scene from given path
|
void |
open(java.lang.String fileName,
Cancellation cancellationToken)
Opens the scene from given path
|
void |
open(java.lang.String fileName,
FileFormat format)
Opens the scene from given path using specified file format.
|
void |
open(java.lang.String fileName,
FileFormat format,
Cancellation cancellationToken)
Opens the scene from given path using specified file format.
|
void |
open(java.lang.String fileName,
LoadOptions options)
Opens the scene from given path using specified file format.
|
void |
open(java.lang.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 |
render(Camera camera,
java.awt.image.BufferedImage bitmap)
Render the scene into bitmap from given camera's perspective.
|
void |
render(Camera camera,
java.awt.image.BufferedImage bitmap,
ImageRenderOptions options)
Render the scene into bitmap from given camera's perspective.
|
void |
render(Camera camera,
java.lang.String fileName)
Render the scene into external file from given camera's perspective.
|
void |
render(Camera camera,
java.lang.String fileName,
java.awt.Dimension size,
java.lang.String format)
Render the scene into external file from given camera's perspective.
|
void |
render(Camera camera,
java.lang.String fileName,
java.awt.Dimension size,
java.lang.String format,
ImageRenderOptions options)
Render the scene into external file from given camera's perspective.
|
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(java.lang.String fileName,
FileFormat format)
Saves the scene to specified path using specified file format.
|
void |
save(java.lang.String fileName,
FileFormat format,
Cancellation cancellationToken)
Saves the scene to specified path using specified file format.
|
void |
save(java.lang.String fileName,
SaveOptions options)
Saves the scene to specified path using specified file format.
|
void |
save(java.lang.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 |
getScenefindProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setPropertypublic static final java.lang.String VERSION
public Scene()
Scene class.public Scene(Entity entity)
Scene class with an entity attached to a new node.entity - The initial entity that attached to the scenepublic Scene(Scene parentScene, java.lang.String name)
Scene class as a sub-scene.parentScene - The parent scene.name - Scene's name.public Scene(java.lang.String fileName)
throws java.io.IOException
Scene class and open the file immediately.fileName - File's name to open.java.io.IOExceptionpublic java.util.List<Scene> getSubScenes()
public java.util.List<A3DObject> getLibrary()
public java.util.List<AnimationClip> getAnimationClips()
AnimationClip defined in the scene.public AnimationClip getCurrentAnimationClip()
AnimationClippublic void setCurrentAnimationClip(AnimationClip value)
AnimationClipvalue - New valuepublic AnimationClip getAnimationClip(java.lang.String name)
AnimationClipname - The AnimationClip's name to look uppublic AssetInfo getAssetInfo()
public void setAssetInfo(AssetInfo value)
value - New valuepublic Node getRootNode()
public void clear()
public AnimationClip createAnimationClip(java.lang.String name)
AnimationClip
The first AnimationClip will be assigned to the getCurrentAnimationClip()name - Animation clip's nameprotected void reloadSceneAs(FileFormat fmt) throws java.io.IOException
fmt - java.io.IOExceptionpublic void open(com.aspose.threed.Stream stream,
FileFormat format,
Cancellation cancellationToken)
throws java.io.IOException
stream - Input stream, user is responsible for closing the stream.format - File format.cancellationToken - Cancellation token to the load taskjava.io.IOExceptionpublic void open(com.aspose.threed.Stream stream,
FileFormat format)
throws java.io.IOException
stream - Input stream, user is responsible for closing the stream.format - File format.java.io.IOExceptionpublic void open(com.aspose.threed.Stream stream,
LoadOptions options,
Cancellation cancellationToken)
throws java.io.IOException
stream - Input stream, user is responsible for closing the stream.options - More detailed configuration to open the stream.cancellationToken - Cancellation token to the load taskjava.io.IOExceptionpublic void open(com.aspose.threed.Stream stream,
LoadOptions options)
throws java.io.IOException
stream - Input stream, user is responsible for closing the stream.options - More detailed configuration to open the stream.java.io.IOExceptionpublic void open(com.aspose.threed.Stream stream,
Cancellation cancellationToken)
throws java.io.IOException
stream - Input stream, user is responsible for closing the stream.cancellationToken - Cancellation token to the load taskjava.io.IOExceptionpublic void open(com.aspose.threed.Stream stream)
throws java.io.IOException
stream - Input stream, user is responsible for closing the stream.java.io.IOExceptionpublic void open(java.lang.String fileName,
FileFormat format,
Cancellation cancellationToken)
throws java.io.IOException
fileName - File name.format - File format.cancellationToken - Cancellation token to the load taskjava.io.IOExceptionpublic void open(java.lang.String fileName,
FileFormat format)
throws java.io.IOException
fileName - File name.format - File format.java.io.IOExceptionpublic void open(java.lang.String fileName,
LoadOptions options,
Cancellation cancellationToken)
throws java.io.IOException
fileName - File name.options - More detailed configuration to open the stream.cancellationToken - Cancellation token to the load taskjava.io.IOExceptionpublic void open(java.lang.String fileName,
LoadOptions options)
throws java.io.IOException
fileName - File name.options - More detailed configuration to open the stream.java.io.IOExceptionpublic void open(java.lang.String fileName,
Cancellation cancellationToken)
throws java.io.IOException
fileName - File name.cancellationToken - Cancellation token to the load taskjava.io.IOExceptionpublic void open(java.lang.String fileName)
throws java.io.IOException
fileName - File name.java.io.IOExceptionpublic void save(com.aspose.threed.Stream stream,
FileFormat format,
Cancellation cancellationToken)
throws java.io.IOException
stream - Input stream, user is responsible for closing the stream.format - Format.cancellationToken - Cancellation token to the save taskjava.io.IOExceptionpublic void save(com.aspose.threed.Stream stream,
FileFormat format)
throws java.io.IOException
stream - Input stream, user is responsible for closing the stream.format - Format.java.io.IOExceptionpublic void save(com.aspose.threed.Stream stream,
SaveOptions options,
Cancellation cancellationToken)
throws java.io.IOException
stream - Input stream, user is responsible for closing the stream.options - More detailed configuration to save the stream.cancellationToken - Cancellation token to the save taskjava.io.IOExceptionpublic void save(com.aspose.threed.Stream stream,
SaveOptions options)
throws java.io.IOException
stream - Input stream, user is responsible for closing the stream.options - More detailed configuration to save the stream.java.io.IOExceptionpublic void save(java.lang.String fileName,
FileFormat format,
Cancellation cancellationToken)
throws java.io.IOException
fileName - File name.format - Format.cancellationToken - Cancellation token to the save taskjava.io.IOExceptionpublic void save(java.lang.String fileName,
FileFormat format)
throws java.io.IOException
fileName - File name.format - Format.java.io.IOExceptionpublic void save(java.lang.String fileName,
SaveOptions options,
Cancellation cancellationToken)
throws java.io.IOException
fileName - File name.options - More detailed configuration to save the stream.cancellationToken - Cancellation token to the save taskjava.io.IOExceptionpublic void save(java.lang.String fileName,
SaveOptions options)
throws java.io.IOException
fileName - File name.options - More detailed configuration to save the stream.java.io.IOExceptionpublic void render(Camera camera, java.lang.String fileName) throws java.io.IOException
camera - From which camera's perspective to render the scenefileName - The file name of output filejava.io.IOExceptionpublic void render(Camera camera, java.lang.String fileName, java.awt.Dimension size, java.lang.String format) throws java.io.IOException
camera - From which camera's perspective to render the scenefileName - The file name of output filesize - The size of final rendered imageformat - The image format of the output filejava.io.IOExceptionpublic void render(Camera camera, java.lang.String fileName, java.awt.Dimension size, java.lang.String format, ImageRenderOptions options) throws java.io.IOException
camera - From which camera's perspective to render the scenefileName - The file name of output filesize - The size of final rendered imageformat - The image format of the output fileoptions - The option to customize some internal settings.java.io.IOExceptionpublic void render(Camera camera, java.awt.image.BufferedImage bitmap) throws java.io.IOException
camera - From which camera's perspective to render the scenebitmap - Target of the rendered resultjava.io.IOExceptionpublic void render(Camera camera, java.awt.image.BufferedImage bitmap, ImageRenderOptions options) throws java.io.IOException
camera - From which camera's perspective to render the scenebitmap - Target of the rendered resultoptions - The option to customize some internal settings.java.io.IOException