Scene

Scene class

A scene is a top-level object that contains the nodes, geometries, materials, textures, animation, poses, sub-scenes and etc. Scene can have sub-scenes, acts as multiple-document support in files like collada/blender/fbx Node hierarchy can be accessed through RootNodeLibrary 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.

Methods

constructor

NameDescription
constructor()Initializes a new instance of the Scene class.

Result:


constructor_overload

NameDescription
constructor_overload(entity)Initializes a new instance of the Scene class with an entity attached to a new node.

Parameters:

NameTypeDescription
entityEntityThe initial entity that attached to the scene

Result:


constructor_overload$2{#constructor_overload$2}

NameDescription
constructor_overload$2(parentScene, name)Initializes a new instance of the Scene class as a sub-scene.

Parameters:

NameTypeDescription
parentSceneSceneThe parent scene.
nameStringScene’s name.

Result:


constructor_overload$3{#constructor_overload$3}

NameDescription
constructor_overload$3(fileName)Initializes a new instance of the Scene class and open the file immediately. This is an obsoleted constructor, please use #Error Cref: M:Aspose.ThreeD.Scene.FromFile(System.String,System.Threading.CancellationToken).

Parameters:

NameTypeDescription
fileNameStringFile’s name to open.

Result:


getSubScenes

NameDescription
getSubScenes()Gets all sub-scenes

Result:


getLibrary

NameDescription
getLibrary()Objects that not directly used in scene hierarchy can be defined in Library. This is useful when you’re using sub-scenes and put reusable components under sub-scenes.

Result:


getAnimationClips

NameDescription
getAnimationClips()Gets all AnimationClip defined in the scene.

Result:


getCurrentAnimationClip

NameDescription
getCurrentAnimationClip()Gets or sets the active AnimationClip

Result:


setCurrentAnimationClip

NameDescription
setCurrentAnimationClip(value)Gets or sets the active AnimationClip

Result:


getAssetInfo

NameDescription
getAssetInfo()Gets or sets the top-level asset information The document info.

Result:


setAssetInfo

NameDescription
setAssetInfo(value)Gets or sets the top-level asset information The document info.

Result:


getPoses

NameDescription
getPoses()Gets all Pose used in this scene. The poses.

Result:


getRootNode

NameDescription
getRootNode()Gets the root node of the scene. The root node.

Result:


getScene

NameDescription
getScene()Gets the scene that this object belongs to

Result:


getName

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


getAnimationClip

NameDescription
getAnimationClip(name)Gets a named AnimationClip

Parameters:

NameTypeDescription
nameStringThe

Result: AnimationClip


clear

NameDescription
clear()Clears the scene content and restores the default settings.

Result: AnimationClip


createAnimationClip

NameDescription
createAnimationClip(name)A shorthand function to create and register the AnimationClip The first AnimationClip will be assigned to the CurrentAnimationClip

Parameters:

NameTypeDescription
nameStringAnimation clip’s name

Result: AnimationClip


open

NameDescription
open(fileName, options)Opens the scene from given path using specified file format.

Parameters:

NameTypeDescription
fileNameStringFile name.
optionsLoadOptionsMore detailed configuration to open the stream.

Result: AnimationClip


open

NameDescription
open(fileName)Opens the scene from given path

Parameters:

NameTypeDescription
fileNameStringFile name.

Result: AnimationClip


fromFile

NameDescription
fromFile(fileName)Opens the scene from given path

Parameters:

NameTypeDescription
fileNameStringFile name.

Result: AnimationClip


save

NameDescription
save(fileName)Saves the scene to specified path using specified file format.

Parameters:

NameTypeDescription
fileNameStringFile name.

Result: AnimationClip


save

NameDescription
save(fileName, format)Saves the scene to specified path using specified file format.

Parameters:

NameTypeDescription
fileNameStringFile name.
formatFileFormatFormat.

Result: AnimationClip


save

NameDescription
save(fileName, options)Saves the scene to specified path using specified file format.

Parameters:

NameTypeDescription
fileNameStringFile name.
optionsSaveOptionsMore detailed configuration to save the stream.

Result: AnimationClip


render

NameDescription
render(camera, fileName)Render the scene into external file from given camera’s perspective. The default output size is 1024x768 and output format is png

Parameters:

NameTypeDescription
cameraCameraFrom which camera’s perspective to render the scene
fileNameStringThe file name of output file

Result: AnimationClip


render

NameDescription
render(camera, fileName, size, format)Render the scene into external file from given camera’s perspective.

Parameters:

NameTypeDescription
cameraCameraFrom which camera’s perspective to render the scene
fileNameStringThe file name of output file
sizeVector2The size of final rendered image
formatStringThe image format of the output file

Result: AnimationClip


render

NameDescription
render(camera, fileName, size, format, options)Render the scene into external file from given camera’s perspective.

Parameters:

NameTypeDescription
cameraCameraFrom which camera’s perspective to render the scene
fileNameStringThe file name of output file
sizeVector2The size of final rendered image
formatStringThe image format of the output file
optionsImageRenderOptionsThe option to customize some internal settings.

Result: AnimationClip


render

NameDescription
render(camera, bitmap)Render the scene into bitmap from given camera’s perspective.

Parameters:

NameTypeDescription
cameraCameraFrom which camera’s perspective to render the scene
bitmapTextureDataTarget of the rendered result

Result: AnimationClip


render

NameDescription
render(camera, bitmap, options)Render the scene into bitmap from given camera’s perspective.

Parameters:

NameTypeDescription
cameraCameraFrom which camera’s perspective to render the scene
bitmapTextureDataTarget of the rendered result
optionsImageRenderOptionsThe option to customize some internal settings.

Result: AnimationClip


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

NameDescription
findProperty(propertyName)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property