Click or drag to resize

Scene Class

Represents a completely imported model or scene. Everything that was imported from the given file can be accessed from here. Once the scene is loaded from unmanaged memory, it resides solely in managed memory and Assimp's read only copy is released.
Inheritance Hierarchy
SystemObject
  Internal.AssimpScene

Namespace: Internal.Assimp
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntax
C#
public sealed class Scene : IMarshalable<Scene, AiScene>

The Scene type exposes the following members.

Constructors
 NameDescription
Public methodScene Constructs a new instance of the Scene class.
Public methodScene(String) Constructs a new instance of the Scene class.
Top
Properties
 NameDescription
Public propertyAnimationCount Gets the number of animations in the scene.
Public propertyAnimations Gets the animations in the scene, if any.
Public propertyCameraCount Gets the number of cameras in the scene.
Public propertyCameras Gets the cameras in the scene, if any.
Public propertyHasAnimations Gets if the scene contains any animations.
Public propertyHasCameras Gets if the scene contains any cameras.
Public propertyHasLights Gets if the scene contains any lights.
Public propertyHasMaterials Gets if the scene contains any materials. There should always be at least the default Assimp material if no materials were loaded.
Public propertyHasMeshes Gets if the scene contains meshes. Unless if no special scene flags are set this should always be true.
Public propertyHasTextures Gets if the scene contains embedded textures.
Public propertyLightCount Gets the number of lights in the scene.
Public propertyLights Gets the lights in the scene, if any.
Public propertyMaterialCount Gets the number of materials in the scene. There should always be at least the default Assimp material if no materials were loaded.
Public propertyMaterials Gets the materials in the scene.
Public propertyMeshCount Gets the number of meshes in the scene.
Public propertyMeshes Gets the meshes contained in the scene, if any.
Public propertyMetadata Gets the metadata of the scene. This data contains global metadata which belongs to the scene like unit-conversions, versions, vendors or other model-specific data. This can be used to store format-specific metadata as well.
Public propertyName Gets or sets the name of the scene.
Public propertyRootNode Gets or sets the root node of the scene graph. There will always be at least the root node if the import was successful and no special flags have been set. Presence of further nodes depends on the format and content of the imported file.
Public propertySceneFlags Gets or sets the state of the imported scene. By default no flags are set, but issues can arise if the flag is set to incomplete.
Public propertyTextureCount Gets the number of embedded textures in the scene.
Public propertyTextures Gets the embedded textures in the scene, if any.
Top
Methods
 NameDescription
Public methodClear Clears the scene of all components.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodFindBone Will try to locate a bone described by its name.
Public methodStatic memberFreeNative Frees unmanaged memory created by ToNative(IntPtr, Native).
Public methodStatic memberFreeUnmanagedScene Frees unmanaged memory allocated -ONLY- in ToUnmanagedScene(Scene). To free an unmanaged scene allocated by the unmanaged Assimp library, call the appropiate ReleaseImport(IntPtr) function.
Public methodStatic memberFromUnmanagedScene Marshals an unmanaged scene to managed memory. This does not free the unmanaged memory.
Public methodGetEmbeddedTexture Gets an embedded texture by a string. The string may be a texture ID in the format of "*1" or is the file name of the texture.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodStatic memberToUnmanagedScene Marshals a managed scene to unmanaged memory. The unmanaged memory must be freed with a call to FreeUnmanagedScene(IntPtr), the memory is owned by AssimpNet and cannot be freed by the native library.
Top
Extension Methods
 NameDescription
Public Extension MethodMethodInvoke Calls the object method by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGet Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGetT Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertySet Sets the value of the object property by name.
(Defined by ObjectEx)
Top
See Also