Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
aiScene Struct Reference

The root structure of the imported data. More...

#include <scene.h>

Public Member Functions

ASSIMP_API aiScene ()
 Default constructor - set everything to 0/nullptr. More...
 
const aiTextureGetEmbeddedTexture (const char *filename) const
 Returns an embedded texture. More...
 
std::pair< const aiTexture *, int > GetEmbeddedTextureAndIndex (const char *filename) const
 Returns an embedded texture and its index. More...
 
bool HasAnimations () const
 Check whether the scene contains animations. More...
 
bool HasCameras () const
 Check whether the scene contains cameras. More...
 
bool HasLights () const
 Check whether the scene contains lights. More...
 
bool HasMaterials () const
 Check whether the scene contains materials Unless no special scene flags are set this will always be true. More...
 
bool HasMeshes () const
 Check whether the scene contains meshes Unless no special scene flags are set this will always be true. More...
 
bool hasSkeletons () const
 
bool HasTextures () const
 Check whether the scene contains textures. More...
 
ASSIMP_API ~aiScene ()
 Destructor. More...
 

Static Public Member Functions

static const char * GetShortFilename (const char *filename)
 Returns a short filename from a full path. More...
 

Public Attributes

C_STRUCT aiAnimation ** mAnimations
 The array of animations. More...
 
C_STRUCT aiCamera ** mCameras
 The array of cameras. More...
 
unsigned int mFlags
 Any combination of the AI_SCENE_FLAGS_XXX flags. More...
 
C_STRUCT aiLight ** mLights
 The array of light sources. More...
 
C_STRUCT aiMaterial ** mMaterials
 The array of materials. More...
 
C_STRUCT aiMesh ** mMeshes
 The array of meshes. More...
 
C_STRUCT aiMetadatamMetaData
 The global metadata assigned to the scene itself. More...
 
C_STRUCT aiString mName
 The name of the scene itself. More...
 
unsigned int mNumAnimations
 The number of animations in the scene. More...
 
unsigned int mNumCameras
 The number of cameras in the scene. More...
 
unsigned int mNumLights
 The number of light sources in the scene. More...
 
unsigned int mNumMaterials
 The number of materials in the scene. More...
 
unsigned int mNumMeshes
 The number of meshes in the scene. More...
 
unsigned int mNumSkeletons
 
unsigned int mNumTextures
 The number of textures embedded into the file. More...
 
void * mPrivate
 Internal data, do not touch. More...
 
C_STRUCT aiNodemRootNode
 The root node of the hierarchy. More...
 
C_STRUCT aiSkeleton ** mSkeletons
 
C_STRUCT aiTexture ** mTextures
 The array of embedded textures. More...
 

Detailed Description

The root structure of the imported data.

Everything that was imported from the given file can be accessed from here. Objects of this class are generally maintained and owned by Assimp, not by the caller. You shouldn't want to instance it, nor should you ever try to delete a given scene on your own.

Constructor & Destructor Documentation

◆ aiScene()

ASSIMP_API aiScene::aiScene ( )

Default constructor - set everything to 0/nullptr.

◆ ~aiScene()

ASSIMP_API aiScene::~aiScene ( )

Destructor.

Member Function Documentation

◆ GetEmbeddedTexture()

const aiTexture * aiScene::GetEmbeddedTexture ( const char *  filename) const
inline

Returns an embedded texture.

◆ GetEmbeddedTextureAndIndex()

std::pair< const aiTexture *, int > aiScene::GetEmbeddedTextureAndIndex ( const char *  filename) const
inline

Returns an embedded texture and its index.

◆ GetShortFilename()

static const char * aiScene::GetShortFilename ( const char *  filename)
inlinestatic

Returns a short filename from a full path.

◆ HasAnimations()

bool aiScene::HasAnimations ( ) const
inline

Check whether the scene contains animations.

◆ HasCameras()

bool aiScene::HasCameras ( ) const
inline

Check whether the scene contains cameras.

◆ HasLights()

bool aiScene::HasLights ( ) const
inline

Check whether the scene contains lights.

◆ HasMaterials()

bool aiScene::HasMaterials ( ) const
inline

Check whether the scene contains materials Unless no special scene flags are set this will always be true.

◆ HasMeshes()

bool aiScene::HasMeshes ( ) const
inline

Check whether the scene contains meshes Unless no special scene flags are set this will always be true.

◆ hasSkeletons()

bool aiScene::hasSkeletons ( ) const
inline

◆ HasTextures()

bool aiScene::HasTextures ( ) const
inline

Check whether the scene contains textures.

Member Data Documentation

◆ mAnimations

C_STRUCT aiAnimation** aiScene::mAnimations

The array of animations.

All animations imported from the given file are listed here. The array is mNumAnimations in size.

◆ mCameras

C_STRUCT aiCamera** aiScene::mCameras

The array of cameras.

All cameras imported from the given file are listed here. The array is mNumCameras in size. The first camera in the array (if existing) is the default camera view into the scene.

◆ mFlags

unsigned int aiScene::mFlags

Any combination of the AI_SCENE_FLAGS_XXX flags.

By default this value is 0, no flags are set. Most applications will want to reject all scenes with the AI_SCENE_FLAGS_INCOMPLETE bit set.

◆ mLights

C_STRUCT aiLight** aiScene::mLights

The array of light sources.

All light sources imported from the given file are listed here. The array is mNumLights in size.

◆ mMaterials

C_STRUCT aiMaterial** aiScene::mMaterials

The array of materials.

Use the index given in each aiMesh structure to access this array. The array is mNumMaterials in size. If the AI_SCENE_FLAGS_INCOMPLETE flag is not set there will always be at least ONE material.

◆ mMeshes

C_STRUCT aiMesh** aiScene::mMeshes

The array of meshes.

Use the indices given in the aiNode structure to access this array. The array is mNumMeshes in size. If the AI_SCENE_FLAGS_INCOMPLETE flag is not set there will always be at least ONE material.

◆ mMetaData

C_STRUCT aiMetadata* aiScene::mMetaData

The global metadata assigned to the scene itself.

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.

◆ mName

C_STRUCT aiString aiScene::mName

The name of the scene itself.

◆ mNumAnimations

unsigned int aiScene::mNumAnimations

The number of animations in the scene.

◆ mNumCameras

unsigned int aiScene::mNumCameras

The number of cameras in the scene.

Cameras are fully optional, in most cases this attribute will be 0

◆ mNumLights

unsigned int aiScene::mNumLights

The number of light sources in the scene.

Light sources are fully optional, in most cases this attribute will be 0

◆ mNumMaterials

unsigned int aiScene::mNumMaterials

The number of materials in the scene.

◆ mNumMeshes

unsigned int aiScene::mNumMeshes

The number of meshes in the scene.

◆ mNumSkeletons

unsigned int aiScene::mNumSkeletons

◆ mNumTextures

unsigned int aiScene::mNumTextures

The number of textures embedded into the file.

◆ mPrivate

void* aiScene::mPrivate

Internal data, do not touch.

◆ mRootNode

C_STRUCT aiNode* aiScene::mRootNode

The root node of the hierarchy.

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.

◆ mSkeletons

C_STRUCT aiSkeleton** aiScene::mSkeletons

◆ mTextures

C_STRUCT aiTexture** aiScene::mTextures

The array of embedded textures.

Not many file formats embed their textures into the file. An example is Quake's MDL format (which is also used by some GameStudio versions)


The documentation for this struct was generated from the following file: