SLProject 4.0.000
SLImporter Class Referenceabstract

Interface for 3D file format importer implementations. More...

#include <SLImporter.h>

Public Member Functions

 SLImporter ()
 
 SLImporter (SLLogVerbosity consoleVerb)
 
 SLImporter (const SLstring &logFile, SLLogVerbosity logConsoleVerb=LV_normal, SLLogVerbosity logFileVerb=LV_diagnostic)
 
virtual ~SLImporter ()
 
void logConsoleVerbosity (SLLogVerbosity verb)
 
void logFileVerbosity (SLLogVerbosity verb)
 
virtual SLNodeload (SLAnimManager &aniMan, SLAssetManager *assetMgr, SLstring pathFilename, SLstring texturePath, SLSkybox *skybox=nullptr, SLbool deleteTexImgAfterBuild=false, SLbool loadMeshesOnly=true, SLMaterial *overrideMat=nullptr, float ambientFactor=0.0f, SLbool forceCookTorranceRM=false, SLProgressHandler *progressHandler=nullptr, SLuint flags=SLProcess_Triangulate|SLProcess_JoinIdenticalVertices|SLProcess_SplitLargeMeshes|SLProcess_RemoveRedundantMaterials|SLProcess_SortByPType|SLProcess_FindDegenerates|SLProcess_FindInvalidData)=0
 
SLNoderootNode ()
 
SLVMeshmeshes ()
 
SLAnimSkeletonskeleton ()
 
SLVAnimationnodeAnimations ()
 

Protected Member Functions

void logMessage (SLLogVerbosity verbosity, const char *msg,...)
 

Protected Attributes

std::ofstream _log
 log stream More...
 
SLstring _logFile
 name of the log file More...
 
SLLogVerbosity _logConsoleVerbosity
 verbosity level of log output to the console More...
 
SLLogVerbosity _logFileVerbosity
 verbosity level of log output to the file More...
 
SLNode_sceneRoot
 the root node of the scene More...
 
SLVMesh _meshes
 all imported meshes More...
 
SLAnimSkeleton_skeleton
 the imported skeleton for this file More...
 
SLVAnimation _nodeAnimations
 all imported node animations More...
 

Detailed Description

Interface for 3D file format importer implementations.

Constructor & Destructor Documentation

◆ SLImporter() [1/3]

SLImporter::SLImporter ( )

Default constructor, doesn't log anything

◆ SLImporter() [2/3]

SLImporter::SLImporter ( SLLogVerbosity  consoleVerb)
explicit

Constructor that only outputs console logs

◆ SLImporter() [3/3]

SLImporter::SLImporter ( const SLstring logFile,
SLLogVerbosity  logConsoleVerb = LV_normal,
SLLogVerbosity  logFileVerb = LV_diagnostic 
)
explicit

Constructor that allows logging to a file with different verbosity

◆ ~SLImporter()

SLImporter::~SLImporter ( )
virtual

Destructor, closes the file stream if it was used

Member Function Documentation

◆ load()

virtual SLNode * SLImporter::load ( SLAnimManager aniMan,
SLAssetManager assetMgr,
SLstring  pathFilename,
SLstring  texturePath,
SLSkybox skybox = nullptr,
SLbool  deleteTexImgAfterBuild = false,
SLbool  loadMeshesOnly = true,
SLMaterial overrideMat = nullptr,
float  ambientFactor = 0.0f,
SLbool  forceCookTorranceRM = false,
SLProgressHandler *  progressHandler = nullptr,
SLuint  flags = SLProcess_Triangulate|SLProcess_JoinIdenticalVertices|SLProcess_SplitLargeMeshes|SLProcess_RemoveRedundantMaterials|SLProcess_SortByPType|SLProcess_FindDegenerates|SLProcess_FindInvalidData 
)
pure virtual

◆ logConsoleVerbosity()

void SLImporter::logConsoleVerbosity ( SLLogVerbosity  verb)
inline

◆ logFileVerbosity()

void SLImporter::logFileVerbosity ( SLLogVerbosity  verb)
inline

◆ logMessage()

void SLImporter::logMessage ( SLLogVerbosity  verbosity,
const char *  msg,
  ... 
)
protected

Logs messages to the importer logfile and the console

Parameters
msgthe message to add to the log
verbositythe verbosity of the message
Todo:
Build a dedicated log class that can be instantiated (so the importer can have its own) Let this log class write to file etc. Don't use printf anymore, its c. (c++11 has to_str, else we have to work with ss (ugh...)) I only used printf here because it allows me to combine a string with different variables in only one line and I don't have an easy way to do this in c++0x. Again c++11 would be easy.

◆ meshes()

SLVMesh & SLImporter::meshes ( )
inline

◆ nodeAnimations()

SLVAnimation & SLImporter::nodeAnimations ( )
inline

◆ rootNode()

SLNode * SLImporter::rootNode ( )
inline

◆ skeleton()

SLAnimSkeleton * SLImporter::skeleton ( )
inline

Member Data Documentation

◆ _log

std::ofstream SLImporter::_log
protected

log stream

◆ _logConsoleVerbosity

SLLogVerbosity SLImporter::_logConsoleVerbosity
protected

verbosity level of log output to the console

◆ _logFile

SLstring SLImporter::_logFile
protected

name of the log file

◆ _logFileVerbosity

SLLogVerbosity SLImporter::_logFileVerbosity
protected

verbosity level of log output to the file

◆ _meshes

SLVMesh SLImporter::_meshes
protected

all imported meshes

◆ _nodeAnimations

SLVAnimation SLImporter::_nodeAnimations
protected

all imported node animations

◆ _sceneRoot

SLNode* SLImporter::_sceneRoot
protected

the root node of the scene

◆ _skeleton

SLAnimSkeleton* SLImporter::_skeleton
protected

the imported skeleton for this file


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