Scene

Overview

Scene is a class in Aspose.3D FOSS for Java. Inherits from: SceneObject.

This class provides 73 methods and 8 properties for working with Scene objects in Java. Available methods include: Scene, clear, createAnimationClip, fromFile, fromStream, getAnimationClip, getAnimationClips, getAssetInfo, getCurrentAnimationClip, getLibrary, getPoses, getRootNode, and additional methods. Properties: VERSION, animationClips, assetInfo, currentAnimationClip, library, poses, rootNode, subScenes.

Description

Scene is a class in the Aspose.3D FOSS library for Java that exposes 78 methods and 11 properties for programmatic use. It extends SceneObject, inheriting shared functionality from its parent type.

Core capabilities include: node; assetinfo; list<scene>. These operations enable developers to integrate scene functionality directly into Java applications.

The class also provides the rootNode property (gets the root node), the assetInfo property (gets the asset info), the subScenes property (gets the sub scenes).

The class offers 5 constructor overloads, allowing flexible initialization depending on the calling context.

Properties

NameTypeAccessDescription
rootNodeNodeReadGets the root node.
assetInfoAssetInfoReadGets the asset info.
subScenesList<Scene>ReadGets the sub scenes.
libraryList<A3DObject>ReadGets the library.
animationClipsList<AnimationClip>ReadGets the animation clips.
currentAnimationClipAnimationClipReadGets the current animation clip.
posesCollection<Pose>ReadGets the poses.
VERSIONStringReadGets the version.

Methods

SignatureDescription
Scene()Creates an empty scene with no nodes or animations
Scene(entity: Entity)Creates a scene containing the specified entity as its root content
Scene(scene: Scene, name: String)Creates a named sub-scene derived from the given parent scene
getRootNode()NodeReturns the root node.
getAssetInfo()AssetInfoReturns the asset info.
setAssetInfo(value: AssetInfo)Sets the asset info value.
getSubScenes()List<Scene>Returns the sub scenes.
getLibrary()List<A3DObject>Returns the library.
getAnimationClips()List<AnimationClip>Returns the animation clips.
getCurrentAnimationClip()AnimationClipReturns the current animation clip.
setCurrentAnimationClip(value: AnimationClip)Sets the current animation clip value.
getAnimationClip(name: String)AnimationClipReturns the animation clip with the given name, or null if not found
createAnimationClip(name: String)AnimationClipCreates a new named animation clip and adds it to the scene
getPoses()Collection<Pose>Returns the poses.
clear()Removes all nodes, animations, and library objects from this scene
open(filePath: String)Loads a 3D scene from the specified file path
open(filePath: String, cancellationToken: Cancellation)Loads a 3D scene from the file path with cancellation support
open(filePath: String, format: FileFormat)Loads a 3D scene from the file path using the specified file format
open(filePath: String, format: FileFormat, cancellationToken: Cancellation)Loads a 3D scene from the file path with format and cancellation support
open(filePath: String, options: LoadOptions)Loads a 3D scene from the file path using the specified load options
open(filePath: String, options: LoadOptions, cancellationToken: Cancellation)Loads a 3D scene from the file path with load options and cancellation support
open(stream: InputStream)Loads a 3D scene from the given input stream
open(stream: InputStream, cancellationToken: Cancellation)Loads a 3D scene from the input stream with cancellation support
open(stream: InputStream, format: FileFormat)Loads a 3D scene from the input stream using the specified file format
open(stream: InputStream, format: FileFormat, cancellationToken: Cancellation)Loads a 3D scene from the input stream with format and cancellation support
open(stream: InputStream, options: LoadOptions)Loads a 3D scene from the input stream using the specified load options
open(stream: InputStream, options: LoadOptions, cancellationToken: Cancellation)Loads a 3D scene from the input stream with load options and cancellation support
open(stream: Stream, format: FileFormat, options: LoadOptions)Loads a 3D scene from a Stream with explicit format and load options
open(stream: Stream, format: FileFormat, options: LoadOptions, cancellationToken: Cancellation)Loads a 3D scene from a Stream with format, options, and cancellation support
open(stream: Stream)Loads a 3D scene from the given Stream
open(stream: Stream, cancellationToken: Cancellation)Loads a 3D scene from a Stream with cancellation support
open(stream: Stream, format: FileFormat)Loads a 3D scene from a Stream using the specified file format
open(stream: Stream, format: FileFormat, cancellationToken: Cancellation)Loads a 3D scene from a Stream with format and cancellation support
open(stream: Stream, options: LoadOptions)Loads a 3D scene from a Stream using the specified load options
open(stream: Stream, options: LoadOptions, cancellationToken: Cancellation)Loads a 3D scene from a Stream with load options and cancellation support
fromFile(filePath: String)SceneCreates and returns a new Scene loaded from the specified file path
fromFile(filePath: String, cancellationToken: Cancellation)SceneCreates a Scene from the file path with cancellation support
fromFile(filePath: String, format: FileFormat)SceneCreates a Scene from the file path using the specified file format
fromFile(filePath: String, format: FileFormat, cancellationToken: Cancellation)SceneCreates a Scene from the file path with format and cancellation support
fromFile(filePath: String, options: LoadOptions)SceneCreates a Scene from the file path using the specified load options
fromFile(filePath: String, options: LoadOptions, cancellationToken: Cancellation)SceneCreates a Scene from the file path with load options and cancellation support
fromStream(stream: InputStream)SceneCreates and returns a new Scene loaded from the given input stream
fromStream(stream: InputStream, cancellationToken: Cancellation)SceneCreates a Scene from the input stream with cancellation support
fromStream(stream: InputStream, format: FileFormat)SceneCreates a Scene from the input stream using the specified file format
fromStream(stream: InputStream, format: FileFormat, cancellationToken: Cancellation)SceneCreates a Scene from the input stream with format and cancellation support
fromStream(stream: InputStream, options: LoadOptions)SceneCreates a Scene from the input stream using the specified load options
fromStream(stream: InputStream, options: LoadOptions, cancellationToken: Cancellation)SceneCreates a Scene from the input stream with load options and cancellation support
fromStream(stream: Stream)SceneCreates and returns a new Scene loaded from the given Stream
fromStream(stream: Stream, cancellationToken: Cancellation)SceneCreates a Scene from a Stream with cancellation support
fromStream(stream: Stream, format: FileFormat)SceneCreates a Scene from a Stream using the specified file format
fromStream(stream: Stream, format: FileFormat, cancellationToken: Cancellation)SceneCreates a Scene from a Stream with format and cancellation support
fromStream(stream: Stream, options: LoadOptions)SceneCreates a Scene from a Stream using the specified load options
fromStream(stream: Stream, options: LoadOptions, cancellationToken: Cancellation)SceneCreates a Scene from a Stream with load options and cancellation support
save(filePath: String)Saves this scene to the specified file path using the format inferred from the extension
save(filePath: String, format: FileFormat)Saves this scene to the file path using the specified file format
save(filePath: String, format: FileFormat, cancellationToken: Cancellation)Saves this scene to the file path with format and cancellation support
save(filePath: String, options: SaveOptions)Saves this scene to the file path using the specified save options
save(filePath: String, options: SaveOptions, cancellationToken: Cancellation)Saves this scene to the file path with save options and cancellation support
save(stream: OutputStream, format: FileFormat)Saves this scene to the output stream using the specified file format
save(stream: OutputStream, format: FileFormat, cancellationToken: Cancellation)Saves this scene to the output stream with format and cancellation support
save(stream: OutputStream, options: SaveOptions)Saves this scene to the output stream using the specified save options
save(stream: OutputStream, options: SaveOptions, cancellationToken: Cancellation)Saves this scene to the output stream with save options and cancellation support
save(stream: OutputStream, format: FileFormat, options: SaveOptions)Saves this scene to the output stream with explicit format and save options
save(stream: OutputStream, format: FileFormat, options: SaveOptions, cancellationToken: Cancellation)Saves this scene to the output stream with format, options, and cancellation support
save(stream: Stream, format: FileFormat)Saves this scene to a Stream using the specified file format
save(stream: Stream, format: FileFormat, cancellationToken: Cancellation)Saves this scene to a Stream with format and cancellation support
save(stream: Stream, options: SaveOptions)Saves this scene to a Stream using the specified save options
save(stream: Stream, options: SaveOptions, cancellationToken: Cancellation)Saves this scene to a Stream with save options and cancellation support
render(camera: Camera, fileName: String)Not implemented in the FOSS edition — throws at runtime.
render(camera: Camera, fileName: String, size: Vector2, format: String)Not implemented in the FOSS edition — throws at runtime.
render(camera: Camera, fileName: String, size: Vector2, format: String, options: ImageRenderOptions)Not implemented in the FOSS edition — throws at runtime.
render(camera: Camera, texture: TextureData)Not implemented in the FOSS edition — throws at runtime.
render(camera: Camera, texture: TextureData, options: ImageRenderOptions)Not implemented in the FOSS edition — throws at runtime.

See Also