Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
coal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coal
coal
Commits
9be8cf60
Commit
9be8cf60
authored
5 years ago
by
Joseph Mirabel
Browse files
Options
Downloads
Patches
Plain Diff
[Assimp] Change assimp postprocessing steps.
parent
e7d6ddc8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/hpp/fcl/mesh_loader/assimp.h
+24
-19
24 additions, 19 deletions
include/hpp/fcl/mesh_loader/assimp.h
with
24 additions
and
19 deletions
include/hpp/fcl/mesh_loader/assimp.h
+
24
−
19
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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment