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

NameTypeAccessDescription
SubScenesIList<Scene>ReadGets all sub-scenes
LibraryIList<A3DObject>ReadObjects that not directly used in scene hierarchy can be defined in Library.
AnimationClipsIList<AnimationClip>ReadGets all AnimationClip defined in the scene.
CurrentAnimationClipAnimationClip?Read/WriteGets or sets the active AnimationClip
AssetInfoAssetInfo?Read/WriteGets or sets the top-level asset information
PosesICollection<Pose>ReadGets all Pose used in this scene.
RootNodeNodeReadGets the root node of the scene.
VersionstringReadVersion of the Aspose.3D library.
SceneSceneReadGets the scene that this object belongs to
NamestringRead/WriteGets or sets the name.
PropertiesPropertyCollectionReadGets the collection of all properties.

Methods

SignatureDescription
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.

See Also

 English