Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OpenFlipper-Staging
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
OpenFlipper-Free
OpenFlipper-Staging
Commits
4a7dde8b
Commit
4a7dde8b
authored
7 years ago
by
Jan Möbius
Browse files
Options
Downloads
Plain Diff
Merge branch 'prepareAssimpPlugin' into 'master'
Prepare assimp plugin See merge request
!5
parents
fd7c45e0
8662a68a
No related branches found
No related tags found
1 merge request
!5
Prepare assimp plugin
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
PluginCollection-FilePlugins/Plugin-Assimp/AssimpPlugin.cc
+2
-64
2 additions, 64 deletions
PluginCollection-FilePlugins/Plugin-Assimp/AssimpPlugin.cc
PluginCollection-FilePlugins/Plugin-Assimp/CMakeLists.txt
+1
-1
1 addition, 1 deletion
PluginCollection-FilePlugins/Plugin-Assimp/CMakeLists.txt
with
3 additions
and
65 deletions
PluginCollection-FilePlugins/Plugin-Assimp/AssimpPlugin.cc
+
2
−
64
View file @
4a7dde8b
...
...
@@ -45,68 +45,6 @@
#include
"AssimpPlugin.hh"
/*
* we have to implement our own aiScene and aiMaterial constructor/destructor
* since the linker cannot find the corresponding symbols from the
* assimp library
*/
aiMaterial
::
aiMaterial
()
{
mNumAllocated
=
0
;
mNumProperties
=
0
;
mProperties
=
NULL
;
}
aiMaterial
::~
aiMaterial
()
{
for
(
unsigned
int
i
=
0
;
i
<
mNumProperties
;
++
i
)
delete
mProperties
[
i
];
delete
[]
mProperties
;
}
aiScene
::
aiScene
()
{
mFlags
=
0
;
mRootNode
=
NULL
;
mNumMeshes
=
0
;
mMeshes
=
NULL
;
mNumMaterials
=
0
;
mMaterials
=
NULL
;
mNumAnimations
=
0
;
mAnimations
=
NULL
;
mNumTextures
=
0
;
mTextures
=
NULL
;
mNumLights
=
0
;
mLights
=
NULL
;
mNumCameras
=
0
;
mCameras
=
NULL
;
}
aiScene
::~
aiScene
()
{
delete
mRootNode
;
for
(
unsigned
int
i
=
0
;
i
<
mNumMeshes
;
++
i
)
delete
mMeshes
[
i
];
delete
[]
mMeshes
;
for
(
unsigned
int
i
=
0
;
i
<
mNumMaterials
;
++
i
)
delete
mMaterials
[
i
];
delete
[]
mMaterials
;
for
(
unsigned
int
i
=
0
;
i
<
mNumAnimations
;
++
i
)
delete
mAnimations
[
i
];
delete
[]
mAnimations
;
for
(
unsigned
int
i
=
0
;
i
<
mNumTextures
;
++
i
)
delete
mTextures
[
i
];
delete
[]
mTextures
;
for
(
unsigned
int
i
=
0
;
i
<
mNumLights
;
++
i
)
delete
mLights
[
i
];
delete
[]
mLights
;
for
(
unsigned
int
i
=
0
;
i
<
mNumCameras
;
++
i
)
delete
mCameras
[
i
];
delete
[]
mCameras
;
}
AssimpPlugin
::
AssimpPlugin
()
:
loadOptions_
(
0
),
...
...
@@ -397,9 +335,9 @@ int AssimpPlugin::loadObject(QString _filename) {
const
aiScene
*
scene
=
NULL
;
if
(
type_
==
DATA_TRIANGLE_MESH
)
scene
=
importer
.
ReadFile
(
_filename
.
toStdString
(),
aiProcess_JoinIdenticalVertices
|
aiProcess_Triangulate
);
scene
=
importer
.
ReadFile
(
_filename
.
toStdString
(),
aiProcess_JoinIdenticalVertices
|
aiProcess_Triangulate
|
aiProcess_FindDegenerates
);
else
scene
=
importer
.
ReadFile
(
_filename
.
toStdString
(),
aiProcess_JoinIdenticalVertices
);
scene
=
importer
.
ReadFile
(
_filename
.
toStdString
(),
aiProcess_JoinIdenticalVertices
|
aiProcess_FindDegenerates
);
if
(
!
scene
)
{
emit
log
(
LOGERR
,
tr
(
importer
.
GetErrorString
()));
...
...
This diff is collapsed.
Click to expand it.
PluginCollection-FilePlugins/Plugin-Assimp/CMakeLists.txt
+
1
−
1
View file @
4a7dde8b
include
(
plugin
)
openflipper_plugin
(
DEPS ASSIMP
TYPES POLYMESH
)
TYPES POLYMESH
TRIANGLEMESH
)
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