Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes

vl::DaeLoader Class Reference

COLLADA loader. More...

#include <DaeLoader.hpp>

List of all members.

Public Member Functions

 DaeLoader ()
bool load (VirtualFile *file)
const ResourceDatabaseresources () const
ResourceDatabaseresources ()
void setLoadOptions (const LoadWriterDae::LoadOptions *options)
const LoadWriterDae::LoadOptionsloadOptions () const

Protected Member Functions

void reset ()
void parseInputs (Dae::Primitive *dae_primitive, const domInputLocalOffset_Array &input_arr, const std::vector< ref< Dae::Input > > &vertex_inputs)
ref< Dae::MeshparseGeometry (daeElement *geometry)
Dae::SourcegetSource (daeElement *source_el)
void bindMaterials (Dae::Node *dae_node, Dae::Mesh *dae_mesh, domBind_materialRef bind_material)
void parseNode (daeElement *el, Dae::Node *parent)
void parseAsset (domElement *root)
void loadImages (const domImage_Array &images)
void parseImages (daeElement *library)
void parseEffects (daeElement *library)
void prepareTexture2D (Dae::Sampler2D *sampler2D)
void parseMaterials (daeElement *library)
ref< LightparseLight (domLight *, Transform *)
void setupLights ()
ref< Effectsetup_vl_Effect (Dae::Material *mat)
template<class T_color_or_texture >
void parseColor (const domProfile_COMMON *common, const T_color_or_texture &color_or_texture, Dae::ColorOrTexture *out_col)
void generateGeometry (Dae::Primitive *primitive, const char *name)

Static Protected Member Functions

static std::string percentDecode (const char *uri)
static Dae::EInputSemantic getSemantic (const char *semantic)
static const char * getSemanticString (Dae::EInputSemantic semantic)
static ETexParamFilter translateSampleFilter (domFx_sampler_filter_common filter)
static ETexParamWrap translateWrapMode (domFx_sampler_wrap_common wrap)

Protected Attributes

const LoadWriterDae::LoadOptionsmLoadOptions
ref< ResourceDatabasemResources
std::vector< ref< Light > > mLights
std::map< daeElementRef, ref
< Dae::Material > > 
mMaterials
std::map< daeElementRef, ref
< Dae::Effect > > 
mEffects
std::map< daeElementRef, ref
< Dae::Mesh > > 
mMeshes
std::vector< ref< Dae::Node > > mNodes
std::map< daeElementRef, ref
< Dae::Source > > 
mSources
std::map< daeElementRef, ref
< Image > > 
mImages
std::map< daeElementRef, ref
< Dae::NewParam > > 
mDaeNewParams
ref< EffectmDefaultFX
ref< Dae::NodemScene
DAE mDAE
String mFilePath
mat4 mUpMatrix
bool mInvertTransparency
bool mAssumeOpaque

Detailed Description

COLLADA loader.

Definition at line 41 of file DaeLoader.hpp.


Constructor & Destructor Documentation

DaeLoader::DaeLoader (  )

Definition at line 77 of file DaeLoader.cpp.

References vl::EN_LIGHTING, mDefaultFX, vl::PM_LINE, and reset().


Member Function Documentation

bool DaeLoader::load ( VirtualFile file )
const ResourceDatabase* vl::DaeLoader::resources (  ) const [inline]

Definition at line 48 of file DaeLoader.hpp.

References vl::ref< T >::get(), and mResources.

Referenced by vl::LoadWriterDae::load().

ResourceDatabase* vl::DaeLoader::resources (  ) [inline]

Definition at line 50 of file DaeLoader.hpp.

References vl::ref< T >::get(), and mResources.

void vl::DaeLoader::setLoadOptions ( const LoadWriterDae::LoadOptions options ) [inline]

Definition at line 54 of file DaeLoader.hpp.

References mLoadOptions.

Referenced by vl::LoadWriterDae::load().

const LoadWriterDae::LoadOptions* vl::DaeLoader::loadOptions (  ) const [inline]

Definition at line 56 of file DaeLoader.hpp.

References mLoadOptions.

Referenced by generateGeometry(), load(), parseAsset(), parseNode(), prepareTexture2D(), and setupLights().

void DaeLoader::reset (  ) [protected]

Definition at line 91 of file DaeLoader.cpp.

References mAssumeOpaque, mInvertTransparency, mResources, mScene, and NULL.

Referenced by DaeLoader(), and load().

void DaeLoader::parseInputs ( Dae::Primitive dae_primitive,
const domInputLocalOffset_Array &  input_arr,
const std::vector< ref< Dae::Input > > &  vertex_inputs 
) [protected]
ref< Dae::Mesh > DaeLoader::parseGeometry ( daeElement *  geometry ) [protected]
Dae::Source * DaeLoader::getSource ( daeElement *  source_el ) [protected]

Definition at line 385 of file DaeLoader.cpp.

References vl::Log::error(), vl::ref< T >::get(), mSources, NULL, and VL_CHECK.

Referenced by parseGeometry(), and parseInputs().

void DaeLoader::bindMaterials ( Dae::Node dae_node,
Dae::Mesh dae_mesh,
domBind_materialRef  bind_material 
) [protected]
void DaeLoader::parseNode ( daeElement *  el,
Dae::Node parent 
) [protected]
void DaeLoader::parseAsset ( domElement *  root ) [protected]
void DaeLoader::loadImages ( const domImage_Array &  images ) [protected]

Definition at line 910 of file DaeLoader.cpp.

References vl::Log::error(), vl::loadImage(), mImages, and percentDecode().

Referenced by parseEffects(), and parseImages().

void DaeLoader::parseImages ( daeElement *  library ) [protected]

Definition at line 927 of file DaeLoader.cpp.

References loadImages().

Referenced by load().

void DaeLoader::parseEffects ( daeElement *  library ) [protected]
void DaeLoader::prepareTexture2D ( Dae::Sampler2D sampler2D ) [protected]
void DaeLoader::parseMaterials ( daeElement *  library ) [protected]

Definition at line 1293 of file DaeLoader.cpp.

References mEffects, mMaterials, and VL_LOG_DEBUG.

Referenced by load().

ref< Light > DaeLoader::parseLight ( domLight *  dom_light,
Transform transform 
) [protected]

Definition at line 1324 of file DaeLoader.cpp.

Referenced by parseNode().

void DaeLoader::setupLights (  ) [protected]
ref< Effect > DaeLoader::setup_vl_Effect ( Dae::Material mat ) [protected]
std::string DaeLoader::percentDecode ( const char *  uri ) [static, protected]

Definition at line 859 of file DaeLoader.cpp.

Referenced by loadImages().

Dae::EInputSemantic DaeLoader::getSemantic ( const char *  semantic ) [static, protected]

Definition at line 1526 of file DaeLoader.cpp.

References vl::Dae::IS_UNKNOWN.

Referenced by parseGeometry(), and parseInputs().

const char * DaeLoader::getSemanticString ( Dae::EInputSemantic  semantic ) [static, protected]

Definition at line 1537 of file DaeLoader.cpp.

References NULL.

Referenced by generateGeometry().

ETexParamFilter DaeLoader::translateSampleFilter ( domFx_sampler_filter_common  filter ) [static, protected]
ETexParamWrap DaeLoader::translateWrapMode ( domFx_sampler_wrap_common  wrap ) [static, protected]

Definition at line 1562 of file DaeLoader.cpp.

References vl::TPW_CLAMP, vl::TPW_CLAMP_TO_BORDER, vl::TPW_MIRRORED_REPEAT, and vl::TPW_REPEAT.

Referenced by parseEffects().

template<class T_color_or_texture >
void DaeLoader::parseColor ( const domProfile_COMMON *  common,
const T_color_or_texture &  color_or_texture,
Dae::ColorOrTexture out_col 
) [protected]
void DaeLoader::generateGeometry ( Dae::Primitive primitive,
const char *  name 
) [protected]

Member Data Documentation

Definition at line 108 of file DaeLoader.hpp.

Referenced by loadOptions(), and setLoadOptions().

Definition at line 111 of file DaeLoader.hpp.

Referenced by load(), reset(), resources(), and setupLights().

std::vector< ref<Light> > vl::DaeLoader::mLights [protected]

Definition at line 112 of file DaeLoader.hpp.

Referenced by load(), parseNode(), and setupLights().

std::map< daeElementRef, ref<Dae::Material> > vl::DaeLoader::mMaterials [protected]

Definition at line 113 of file DaeLoader.hpp.

Referenced by bindMaterials(), and parseMaterials().

std::map< daeElementRef, ref<Dae::Effect> > vl::DaeLoader::mEffects [protected]

Definition at line 114 of file DaeLoader.hpp.

Referenced by parseEffects(), and parseMaterials().

std::map< daeElementRef, ref<Dae::Mesh> > vl::DaeLoader::mMeshes [protected]

Definition at line 115 of file DaeLoader.hpp.

Referenced by parseGeometry().

std::vector< ref<Dae::Node> > vl::DaeLoader::mNodes [protected]

Definition at line 116 of file DaeLoader.hpp.

Referenced by load(), and parseNode().

std::map< daeElementRef, ref<Dae::Source> > vl::DaeLoader::mSources [protected]

Definition at line 117 of file DaeLoader.hpp.

Referenced by getSource().

std::map< daeElementRef, ref<Image> > vl::DaeLoader::mImages [protected]

Definition at line 118 of file DaeLoader.hpp.

Referenced by loadImages(), parseColor(), and parseEffects().

std::map< daeElementRef, ref<Dae::NewParam> > vl::DaeLoader::mDaeNewParams [protected]

Definition at line 119 of file DaeLoader.hpp.

Referenced by parseColor(), and parseEffects().

Definition at line 120 of file DaeLoader.hpp.

Referenced by bindMaterials(), and DaeLoader().

Definition at line 121 of file DaeLoader.hpp.

Referenced by load(), and reset().

DAE vl::DaeLoader::mDAE [protected]

Definition at line 122 of file DaeLoader.hpp.

Referenced by generateGeometry(), load(), and parseGeometry().

Definition at line 123 of file DaeLoader.hpp.

Referenced by load().

Definition at line 124 of file DaeLoader.hpp.

Referenced by load(), and parseAsset().

Definition at line 125 of file DaeLoader.hpp.

Referenced by parseAsset(), parseEffects(), and reset().

bool vl::DaeLoader::mAssumeOpaque [protected]

Definition at line 126 of file DaeLoader.hpp.

Referenced by parseAsset(), parseEffects(), reset(), and setup_vl_Effect().


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

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:10.
Permission is granted to use this page to write and publish articles regarding Visualization Library.