-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
1,520 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#ifndef AVANGO_GUA_NURBS_LOADER_HPP | ||
#define AVANGO_GUA_NURBS_LOADER_HPP | ||
|
||
/** | ||
* \file | ||
* \ingroup av_gua | ||
*/ | ||
|
||
#include <gua/renderer/NURBSLoader.hpp> | ||
|
||
#include <avango/gua/Fields.hpp> | ||
#include <avango/gua/scenegraph/TriMeshNode.hpp> | ||
#include <avango/FieldContainer.h> | ||
|
||
#include <avango/gua/windows_specific_gua.hpp> | ||
|
||
|
||
namespace av | ||
{ | ||
namespace gua | ||
{ | ||
/** | ||
* Wrapper for ::gua::NURBSLoader | ||
* | ||
* \ingroup av_gua | ||
*/ | ||
class AV_GUA_DLL NURBSLoader : public av::FieldContainer | ||
{ | ||
AV_FC_DECLARE(); | ||
|
||
public: | ||
|
||
enum Flags { | ||
DEFAULTS = ::gua::NURBSLoader::DEFAULTS, | ||
LOAD_MATERIALS = ::gua::NURBSLoader::LOAD_MATERIALS, | ||
OPTIMIZE_GEOMETRY = ::gua::NURBSLoader::OPTIMIZE_GEOMETRY, | ||
MAKE_PICKABLE = ::gua::NURBSLoader::MAKE_PICKABLE, | ||
NORMALIZE_SCALE = ::gua::NURBSLoader::NORMALIZE_SCALE, | ||
NORMALIZE_POSITION = ::gua::NURBSLoader::NORMALIZE_POSITION | ||
}; | ||
|
||
/** | ||
* Constructor. When called without arguments, a new ::gua::NURBSLoader is created. | ||
* Otherwise, the given ::gua::NURBSLoader is used. | ||
*/ | ||
NURBSLoader(::gua::NURBSLoader* guaNURBSLoader = new ::gua::NURBSLoader()); | ||
|
||
av::Link<av::gua::Node> createGeometryFromFile( | ||
std::string const& nodeName, | ||
std::string const& fileName, | ||
std::string const& fallbackMaterial, | ||
Flags flags = DEFAULTS) const; | ||
|
||
protected: | ||
|
||
/** | ||
* Destructor made protected to prevent allocation on stack. | ||
*/ | ||
// virtual ~NURBSLoader(); | ||
|
||
public: | ||
|
||
/** | ||
* Get the wrapped ::gua::NURBSLoader. | ||
*/ | ||
::gua::NURBSLoader* getGuaNURBSLoader() const; | ||
|
||
|
||
private: | ||
|
||
::gua::NURBSLoader *m_guaNURBSLoader; | ||
|
||
av::gua::Node* createChildren(std::shared_ptr< ::gua::Node> root) const; | ||
|
||
NURBSLoader(const NURBSLoader&); | ||
NURBSLoader& operator=(const NURBSLoader&); | ||
}; | ||
|
||
typedef SingleField<Link<NURBSLoader> > SFNURBSLoader; | ||
typedef MultiField<Link<NURBSLoader> > MFNURBSLoader; | ||
|
||
} | ||
|
||
#ifdef AV_INSTANTIATE_FIELD_TEMPLATES | ||
template class AV_GUA_DLL SingleField<Link<gua::NURBSLoader> >; | ||
template class AV_GUA_DLL MultiField<Link<gua::NURBSLoader> >; | ||
#endif | ||
|
||
} | ||
|
||
#endif //AVANGO_GUA_NURBS_LOADER_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#ifndef AVANGO_GUA_TRI_MESH_LOADER_HPP | ||
#define AVANGO_GUA_TRI_MESH_LOADER_HPP | ||
|
||
/** | ||
* \file | ||
* \ingroup av_gua | ||
*/ | ||
|
||
#include <gua/renderer/TriMeshLoader.hpp> | ||
|
||
#include <avango/gua/Fields.hpp> | ||
#include <avango/gua/scenegraph/TriMeshNode.hpp> | ||
#include <avango/FieldContainer.h> | ||
|
||
#include <avango/gua/windows_specific_gua.hpp> | ||
|
||
|
||
namespace av | ||
{ | ||
namespace gua | ||
{ | ||
/** | ||
* Wrapper for ::gua::TriMeshLoader | ||
* | ||
* \ingroup av_gua | ||
*/ | ||
class AV_GUA_DLL TriMeshLoader : public av::FieldContainer | ||
{ | ||
AV_FC_DECLARE(); | ||
|
||
public: | ||
|
||
enum Flags { | ||
DEFAULTS = ::gua::TriMeshLoader::DEFAULTS, | ||
LOAD_MATERIALS = ::gua::TriMeshLoader::LOAD_MATERIALS, | ||
OPTIMIZE_GEOMETRY = ::gua::TriMeshLoader::OPTIMIZE_GEOMETRY, | ||
MAKE_PICKABLE = ::gua::TriMeshLoader::MAKE_PICKABLE, | ||
NORMALIZE_SCALE = ::gua::TriMeshLoader::NORMALIZE_SCALE, | ||
NORMALIZE_POSITION = ::gua::TriMeshLoader::NORMALIZE_POSITION | ||
}; | ||
|
||
/** | ||
* Constructor. When called without arguments, a new ::gua::TriMeshLoader is created. | ||
* Otherwise, the given ::gua::TriMeshLoader is used. | ||
*/ | ||
TriMeshLoader(::gua::TriMeshLoader* guaTriMeshLoader = new ::gua::TriMeshLoader()); | ||
|
||
av::Link<av::gua::Node> createGeometryFromFile(std::string const& nodeName, | ||
std::string const& fileName, | ||
std::string const& fallbackMaterial, | ||
Flags flags = DEFAULTS) const; | ||
|
||
protected: | ||
|
||
/** | ||
* Destructor made protected to prevent allocation on stack. | ||
*/ | ||
// virtual ~TriMeshLoader(); | ||
|
||
public: | ||
|
||
/** | ||
* Get the wrapped ::gua::TriMeshLoader. | ||
*/ | ||
::gua::TriMeshLoader* getGuaTriMeshLoader() const; | ||
|
||
|
||
private: | ||
|
||
::gua::TriMeshLoader *m_guaTriMeshLoader; | ||
|
||
av::gua::Node* createChildren(std::shared_ptr< ::gua::Node> root) const; | ||
|
||
TriMeshLoader(const TriMeshLoader&); | ||
TriMeshLoader& operator=(const TriMeshLoader&); | ||
}; | ||
|
||
typedef SingleField<Link<TriMeshLoader> > SFTriMeshLoader; | ||
typedef MultiField<Link<TriMeshLoader> > MFTriMeshLoader; | ||
|
||
} | ||
|
||
#ifdef AV_INSTANTIATE_FIELD_TEMPLATES | ||
template class AV_GUA_DLL SingleField<Link<gua::TriMeshLoader> >; | ||
template class AV_GUA_DLL MultiField<Link<gua::TriMeshLoader> >; | ||
#endif | ||
|
||
} | ||
|
||
#endif //AVANGO_GUA_TRI_MESH_LOADER_HPP |
Oops, something went wrong.