Pioneer
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
SceneGraph::Loader Class Reference

#include <Loader.h>

Inheritance diagram for SceneGraph::Loader:
Inheritance graph
[legend]
Collaboration diagram for SceneGraph::Loader:
Collaboration graph
[legend]

Public Member Functions

 Loader (Graphics::Renderer *r, bool logWarnings=false, bool loadSGMfiles=true)
 
ModelLoadModel (const std::string &name)
 
ModelLoadModel (const std::string &name, const std::string &basepath)
 
const std::vector< std::string > & GetLogMessages () const
 
- Public Member Functions inherited from SceneGraph::BaseLoader
 BaseLoader (Graphics::Renderer *r)
 
Graphics::RendererGetRenderer () const
 
RefCountedPtr< Text::DistanceFieldFontGetLabel3DFont () const
 
RefCountedPtr< Graphics::MaterialGetDecalMaterial (unsigned int index)
 

Protected Types

enum class  ModelFormat : uint8_t { UNKNOWN = 0 , GLTF , COLLADA , WAVEFRONT }
 

Protected Member Functions

bool CheckKeysInRange (const aiNodeAnim *, double start, double end)
 
matrix4x4f ConvertMatrix (const aiMatrix4x4 &) const
 
ModelCreateModel (ModelDefinition &def)
 
RefCountedPtr< NodeLoadMesh (const std::string &filename, const std::vector< AnimDefinition > &animDefs)
 
void AddLog (const std::string &)
 
void CheckAnimationConflicts (const Animation *, const std::vector< Animation * > &)
 
void ConvertAiMeshes (std::vector< RefCountedPtr< StaticGeometry > > &, const aiScene *)
 
void ConvertAnimations (const aiScene *, const std::vector< AnimDefinition > &, Node *meshRoot)
 
void ConvertNodes (aiNode *node, Group *parent, std::vector< RefCountedPtr< StaticGeometry > > &meshes, const matrix4x4f &)
 
void CreateLabel (const std::string &name, Group *parent, const matrix4x4f &)
 
void CreateThruster (const std::string &name, const matrix4x4f &nodeTrans)
 
void CreateNavlight (const std::string &name, const matrix4x4f &nodeTrans)
 
RefCountedPtr< CollisionGeometryCreateCollisionGeometry (RefCountedPtr< StaticGeometry >, unsigned int collFlag)
 
void LoadCollision (const std::string &filename)
 
unsigned int GetGeomFlagForNodeName (const std::string &)
 
- Protected Member Functions inherited from SceneGraph::BaseLoader
void ConvertMaterialDefinition (const MaterialDefinition &)
 
void FindPatterns (PatternContainer &output)
 
void SetUpPatterns ()
 

Protected Attributes

bool m_doLog
 
bool m_loadSGMs
 
bool m_mostDetailedLod
 
ModelFormat m_modelFormat
 
std::vector< std::string > m_logMessages
 
std::string m_curMeshDef
 
RefCountedPtr< Groupm_thrustersRoot
 
RefCountedPtr< Groupm_billboardsRoot
 
- Protected Attributes inherited from SceneGraph::BaseLoader
Graphics::Rendererm_renderer
 
Modelm_model
 
std::string m_curPath
 
RefCountedPtr< Text::DistanceFieldFontm_labelFont
 

Member Enumeration Documentation

◆ ModelFormat

enum class SceneGraph::Loader::ModelFormat : uint8_t
strongprotected
Enumerator
UNKNOWN 
GLTF 
COLLADA 
WAVEFRONT 

Constructor & Destructor Documentation

◆ Loader()

SceneGraph::Loader::Loader ( Graphics::Renderer r,
bool  logWarnings = false,
bool  loadSGMfiles = true 
)

Member Function Documentation

◆ AddLog()

void SceneGraph::Loader::AddLog ( const std::string &  msg)
protected

◆ CheckAnimationConflicts()

void SceneGraph::Loader::CheckAnimationConflicts ( const Animation anim,
const std::vector< Animation * > &  otherAnims 
)
protected
Here is the call graph for this function:

◆ CheckKeysInRange()

bool SceneGraph::Loader::CheckKeysInRange ( const aiNodeAnim *  chan,
double  start,
double  end 
)
protected

◆ ConvertAiMeshes()

void SceneGraph::Loader::ConvertAiMeshes ( std::vector< RefCountedPtr< StaticGeometry > > &  geoms,
const aiScene *  scene 
)
protected
Here is the call graph for this function:

◆ ConvertAnimations()

void SceneGraph::Loader::ConvertAnimations ( const aiScene *  scene,
const std::vector< AnimDefinition > &  animDefs,
Node meshRoot 
)
protected
Here is the call graph for this function:

◆ ConvertMatrix()

matrix4x4f SceneGraph::Loader::ConvertMatrix ( const aiMatrix4x4 &  trans) const
protected

◆ ConvertNodes()

void SceneGraph::Loader::ConvertNodes ( aiNode *  node,
Group parent,
std::vector< RefCountedPtr< StaticGeometry > > &  meshes,
const matrix4x4f accum 
)
protected
Here is the call graph for this function:

◆ CreateCollisionGeometry()

RefCountedPtr< CollisionGeometry > SceneGraph::Loader::CreateCollisionGeometry ( RefCountedPtr< StaticGeometry geom,
unsigned int  collFlag 
)
protected

◆ CreateLabel()

void SceneGraph::Loader::CreateLabel ( const std::string &  name,
Group parent,
const matrix4x4f m 
)
protected
Here is the call graph for this function:

◆ CreateModel()

Model * SceneGraph::Loader::CreateModel ( ModelDefinition def)
protected
Here is the call graph for this function:

◆ CreateNavlight()

void SceneGraph::Loader::CreateNavlight ( const std::string &  name,
const matrix4x4f nodeTrans 
)
protected
Here is the call graph for this function:

◆ CreateThruster()

void SceneGraph::Loader::CreateThruster ( const std::string &  name,
const matrix4x4f nodeTrans 
)
protected
Here is the call graph for this function:

◆ GetGeomFlagForNodeName()

unsigned int SceneGraph::Loader::GetGeomFlagForNodeName ( const std::string &  nodename)
protected

◆ GetLogMessages()

const std::vector< std::string > & SceneGraph::Loader::GetLogMessages ( ) const
inline

◆ LoadCollision()

void SceneGraph::Loader::LoadCollision ( const std::string &  filename)
protected
Here is the call graph for this function:

◆ LoadMesh()

RefCountedPtr< Node > SceneGraph::Loader::LoadMesh ( const std::string &  filename,
const std::vector< AnimDefinition > &  animDefs 
)
protected
Here is the call graph for this function:

◆ LoadModel() [1/2]

Model * SceneGraph::Loader::LoadModel ( const std::string &  name)
Here is the call graph for this function:

◆ LoadModel() [2/2]

Model * SceneGraph::Loader::LoadModel ( const std::string &  name,
const std::string &  basepath 
)
Here is the call graph for this function:

Member Data Documentation

◆ m_billboardsRoot

RefCountedPtr<Group> SceneGraph::Loader::m_billboardsRoot
protected

◆ m_curMeshDef

std::string SceneGraph::Loader::m_curMeshDef
protected

◆ m_doLog

bool SceneGraph::Loader::m_doLog
protected

◆ m_loadSGMs

bool SceneGraph::Loader::m_loadSGMs
protected

◆ m_logMessages

std::vector<std::string> SceneGraph::Loader::m_logMessages
protected

◆ m_modelFormat

ModelFormat SceneGraph::Loader::m_modelFormat
protected

◆ m_mostDetailedLod

bool SceneGraph::Loader::m_mostDetailedLod
protected

◆ m_thrustersRoot

RefCountedPtr<Group> SceneGraph::Loader::m_thrustersRoot
protected

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