Project

General

Profile

SO3Engine
SO3::ALScene Class Reference

#include <ALScene.h>

Public Types

typedef std::unordered_map< std::string, std::string > AlTexturesMap
 

Public Member Functions

 ALScene ()
 Empty constructor. Can be used when you can't directly use the full constructor.
 
 ALScene (ALSceneLoader *alSceneLoader, SScene *scene, std::string ressourceGroup, const aiScene *loadedScene, SNode *parent, const std::string &sceneName, bool isLoaderMode=false)
 
 ~ALScene ()
 Destructor.
 
aiMatrix4x4 getFullTransform (aiNode *toThis)
 
bool load (std::vector< SNode * > &scolNodes, std::vector< SMaterial * > &scolMats)
 
void convert (boost::filesystem::path exportFolder)
 
bool isEmpty ()
 
bool addTextureRef (std::string name, std::string path)
 
std::string getTextureRef (std::string path)
 
SScenegetSScene ()
 
const aiScene * getAiScene ()
 
std::string getRessourceGroup ()
 
std::string getRessourcePath ()
 
std::string getSceneName ()
 
std::set< std::string > getBonesNames ()
 
bool isBone (aiNode *node)
 Check if a node is a bone.
 
bool haveMeshInHierarchy (aiNode *node)
 
bool isSceneDependent (aiNode *node)
 
const std::vector< std::string > getMaterialNames ()
 
ALSceneLoaderGetSceneLoader ()
 
bool IsLoaderModeEnable ()
 

Detailed Description

This class is used to convert a aiScene ( from assimp ) to an array of scol's objects.

Definition at line 30 of file ALScene.h.

Member Typedef Documentation

◆ AlTexturesMap

typedef std::unordered_map<std::string, std::string> SO3::ALScene::AlTexturesMap

Definition at line 33 of file ALScene.h.

Constructor & Destructor Documentation

◆ ALScene() [1/2]

SO3::ALScene::ALScene ( )

Empty constructor. Can be used when you can't directly use the full constructor.

Definition at line 14 of file ALScene.cpp.

◆ ALScene() [2/2]

SO3::ALScene::ALScene ( ALSceneLoader alSceneLoader,
SScene scene,
std::string  ressourceGroup,
const aiScene *  loadedScene,
SNode parent,
const std::string &  sceneName,
bool  isLoaderMode = false 
)

Definition at line 24 of file ALScene.cpp.

◆ ~ALScene()

SO3::ALScene::~ALScene ( )

Destructor.

Definition at line 41 of file ALScene.cpp.

Member Function Documentation

◆ addTextureRef()

bool SO3::ALScene::addTextureRef ( std::string  name,
std::string  path 
)

add a texture reference in the map

Returns
true on success, false if the texture already exist

Definition at line 468 of file ALScene.cpp.

◆ convert()

void SO3::ALScene::convert ( boost::filesystem::path  exportFolder)

Convert the scene in a directory.

Parameters
exportPath: Directory where data should be saved.
flags: Importer flags.

Definition at line 195 of file ALScene.cpp.

◆ getAiScene()

const aiScene * SO3::ALScene::getAiScene ( )

Definition at line 492 of file ALScene.cpp.

◆ getBonesNames()

std::set< std::string > SO3::ALScene::getBonesNames ( )

Definition at line 512 of file ALScene.cpp.

◆ getFullTransform()

aiMatrix4x4 SO3::ALScene::getFullTransform ( aiNode *  toThis)

Definition at line 60 of file ALScene.cpp.

◆ getMaterialNames()

const std::vector< std::string > SO3::ALScene::getMaterialNames ( )

Definition at line 50 of file ALScene.cpp.

◆ getRessourceGroup()

std::string SO3::ALScene::getRessourceGroup ( )

Definition at line 497 of file ALScene.cpp.

◆ getRessourcePath()

std::string SO3::ALScene::getRessourcePath ( )

Definition at line 502 of file ALScene.cpp.

◆ GetSceneLoader()

ALSceneLoader * SO3::ALScene::GetSceneLoader ( )
inline

Definition at line 98 of file ALScene.h.

◆ getSceneName()

std::string SO3::ALScene::getSceneName ( )

Definition at line 507 of file ALScene.cpp.

◆ getSScene()

SScene * SO3::ALScene::getSScene ( )

Definition at line 487 of file ALScene.cpp.

◆ getTextureRef()

std::string SO3::ALScene::getTextureRef ( std::string  path)

get the texture name added with a path

Returns
an empty string if not found, the texture name on success

Definition at line 478 of file ALScene.cpp.

◆ haveMeshInHierarchy()

bool SO3::ALScene::haveMeshInHierarchy ( aiNode *  node)

Definition at line 525 of file ALScene.cpp.

◆ isBone()

bool SO3::ALScene::isBone ( aiNode *  node)

Check if a node is a bone.

Definition at line 517 of file ALScene.cpp.

◆ isEmpty()

bool SO3::ALScene::isEmpty ( )

Check if the assimpScene pointer is null or not.

Returns
true if assimpScene == 0, false otherwise.

Definition at line 45 of file ALScene.cpp.

◆ IsLoaderModeEnable()

bool SO3::ALScene::IsLoaderModeEnable ( )

Definition at line 55 of file ALScene.cpp.

◆ isSceneDependent()

bool SO3::ALScene::isSceneDependent ( aiNode *  node)

Definition at line 545 of file ALScene.cpp.

◆ load()

bool SO3::ALScene::load ( std::vector< SNode * > &  scolNodes,
std::vector< SMaterial * > &  scolMats 
)

Load the scene in the current viewport.

Parameters
flags: Importer flags.
Returns
Array of scol node.

Definition at line 73 of file ALScene.cpp.


The documentation for this class was generated from the following files: