Scene
Overview
Scene is a class in Aspose.3D FOSS for .NET.
Inherits from: SceneObject, INamedObject.
A scene is a top-level object that contains the nodes, geometries, materials, textures, animation, poses, sub-scenes and etc.
This class provides 42 methods for working with Scene objects in .NET programs.
Available methods include: A3DObject, Clear, CreateAnimationClip, FindProperty, FromFile, FromStream, GetAnimationClip, GetProperty, Open, RemoveProperty, Render, Save, and 3 additional methods.
All public members are accessible to any .NET application after installing the Aspose.3D FOSS for .NET package.
Properties: AnimationClips, AssetInfo, CurrentAnimationClip, Library, Name, Poses, and 5 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
SubScenes | IList<Scene> | Read | Gets all sub-scenes |
Library | IList<A3DObject> | Read | Objects that not directly used in scene hierarchy can be defined in Library. |
AnimationClips | IList<AnimationClip> | Read | Gets all AnimationClip defined in the scene. |
CurrentAnimationClip | AnimationClip? | Read/Write | Gets or sets the active AnimationClip |
AssetInfo | AssetInfo? | Read/Write | Gets or sets the top-level asset information |
Poses | ICollection<Pose> | Read | Gets all Pose used in this scene. |
RootNode | Node | Read | Gets the root node of the scene. |
Version | string | Read | Version of the Aspose.3D library. |
Scene | Scene | Read | Gets the scene that this object belongs to |
Name | string | Read/Write | Gets or sets the name. |
Properties | PropertyCollection | Read | Gets the collection of all properties. |
Methods
| Signature | 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(parentScene: Scene, name: string) | Initializes a new instance of the Scene class as a sub-scene. |
GetAnimationClip(name: string) | Gets a named AnimationClip |
Clear() | Clears the scene content and restores the default settings. |
CreateAnimationClip(name: string) | A shorthand function to create and register the The first AnimationClip will be assigned to the |
Open(stream: Stream, format: FileFormat, cancellationToken: CancellationToken) | Opens the scene from given stream using specified file format. |
Open(stream: Stream, options: LoadOptions, cancellationToken: CancellationToken) | Opens the scene from given stream using specified IO config. |
Open(stream: Stream) | Opens the scene from given stream. |
Open(stream: Stream, cancellationToken: CancellationToken) | Opens the scene from given stream. |
Open(fileName: string, format: FileFormat, cancellationToken: CancellationToken) | Opens the scene from given path using specified file format. |
Open(fileName: string, options: LoadOptions) | Opens the scene from given path using specified file format. |
Open(fileName: string, options: LoadOptions, cancellationToken: CancellationToken) | Opens the scene from given path using specified file format. |
Open(fileName: string) | Opens the scene from given path |
Open(fileName: string, cancellationToken: CancellationToken) | Opens the scene from given path |
FromStream(stream: Stream, format: FileFormat, cancellationToken: CancellationToken) | Opens the scene from given stream using specified file format. |
FromStream(stream: Stream, options: LoadOptions, cancellationToken: CancellationToken) | Opens the scene from given stream using specified IO config. |
FromStream(stream: Stream, cancellationToken: CancellationToken) | Opens the scene from given stream |
FromFile(fileName: string, format: FileFormat, cancellationToken: CancellationToken) | Opens the scene from given path using specified file format. |
FromFile(fileName: string, options: LoadOptions, cancellationToken: CancellationToken) | Opens the scene from given path using specified file format. |
FromFile(fileName: string) | Opens the scene from given path |
FromFile(fileName: string, cancellationToken: CancellationToken) | Opens the scene from given path |
Save(stream: Stream, format: FileFormat) | Saves the scene to stream using specified file format. |
Save(stream: Stream, format: FileFormat, cancellationToken: CancellationToken) | Saves the scene to stream using specified file format. |
Save(stream: Stream, options: SaveOptions) | Saves the scene to stream using specified file format. |
Save(stream: Stream, options: SaveOptions, cancellationToken: CancellationToken) | Saves the scene to stream using specified file format. |
Save(fileName: string, format: FileFormat, cancellationToken: CancellationToken) | Saves the scene to specified path using specified file format. |
Save(fileName: string) | Saves the scene to specified path using specified file format. |
Save(fileName: string, format: FileFormat) | Saves the scene to specified path using specified file format. |
Save(fileName: string, options: SaveOptions) | Saves the scene to specified path using specified file format. |
Save(fileName: string, options: SaveOptions, cancellationToken: CancellationToken) | Saves the scene to specified path using specified file format. |
Render(camera: Entities.Camera, fileName: string) | Not implemented in the FOSS edition — throws at runtime. Render the scene into external file from given camera’s perspective. |
Render(camera: Entities.Camera, fileName: string, size: Vector2, format: string) | Not implemented in the FOSS edition — throws at runtime. Render the scene into external file from given camera’s perspective. |
Render(camera: Entities.Camera, fileName: string, size: Vector2, format: string, options: ImageRenderOptions) | Not implemented in the FOSS edition — throws at runtime. Render the scene into external file from given camera’s perspective. |
Render(camera: Entities.Camera, bitmap: TextureData) | Not implemented in the FOSS edition — throws at runtime. Render the scene into bitmap from given camera’s perspective. |
Render(camera: Entities.Camera, bitmap: TextureData, options: ImageRenderOptions) | Not implemented in the FOSS edition — throws at runtime. Render the scene into bitmap from given camera’s perspective. |
SceneObject(name: string) | Initialize an SceneObject with a default name |
A3DObject() | Initializes a new instance of the A3DObject class with no name. |
RemoveProperty(property: Property) | Removes a dynamic property. |
GetProperty(property: string) | Get the value of specified property |
SetProperty(property: string, value: object?) | Sets the value of specified property |
FindProperty(propertyName: string) | Finds the property. |