Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-fcl
Commits
9be8cf60
Commit
9be8cf60
authored
Jun 12, 2019
by
Joseph Mirabel
Browse files
[Assimp] Change assimp postprocessing steps.
parent
e7d6ddc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/hpp/fcl/mesh_loader/assimp.h
View file @
9be8cf60
...
...
@@ -131,26 +131,31 @@ inline void loadPolyhedronFromResource (const std::string & resource_path,
const
boost
::
shared_ptr
<
BVHModel
<
BoundingVolume
>
>
&
polyhedron
)
throw
(
std
::
invalid_argument
)
{
Assimp
::
Importer
importer
;
//
//
set list of ignored parameters (parameters used for rendering)
//
importer.SetPropertyInteger(AI_CONFIG_PP_RVC_FLAGS,
//
aiComponent_TANGENTS_AND_BITANGENTS|
//
aiComponent_COLORS |
//
aiComponent_BONEWEIGHTS |
//
aiComponent_ANIMATIONS |
//
aiComponent_LIGHTS |
//
aiComponent_CAMERAS|
//
aiComponent_TEXTURES |
//
aiComponent_TEXCOORDS |
//
aiComponent_MATERIALS |
//
aiComponent_NORMALS
//
);
// set list of ignored parameters (parameters used for rendering)
importer
.
SetPropertyInteger
(
AI_CONFIG_PP_RVC_FLAGS
,
aiComponent_TANGENTS_AND_BITANGENTS
|
aiComponent_COLORS
|
aiComponent_BONEWEIGHTS
|
aiComponent_ANIMATIONS
|
aiComponent_LIGHTS
|
aiComponent_CAMERAS
|
aiComponent_TEXTURES
|
aiComponent_TEXCOORDS
|
aiComponent_MATERIALS
|
aiComponent_NORMALS
);
const
aiScene
*
scene
=
importer
.
ReadFile
(
resource_path
.
c_str
(),
aiProcess_SortByPType
|
aiProcess_GenNormals
|
aiProcess_Triangulate
|
aiProcess_GenUVCoords
|
aiProcess_FlipUVs
);
// const aiScene* scene = importer.ReadFile(resource_path, aiProcess_SortByPType|
// aiProcess_Triangulate | aiProcess_RemoveComponent |
// aiProcess_JoinIdenticalVertices);
const
aiScene
*
scene
=
importer
.
ReadFile
(
resource_path
.
c_str
(),
aiProcess_SortByPType
|
aiProcess_Triangulate
|
aiProcess_RemoveComponent
|
aiProcess_ImproveCacheLocality
|
// TODO: I (Joseph Mirabel) have no idea whether degenerated triangles are
// properly handled. Enabling aiProcess_FindDegenerates would throw an
// exception when that happens. Is it too conservative ?
// aiProcess_FindDegenerates |
aiProcess_JoinIdenticalVertices
);
if
(
!
scene
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment