Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
David Cazier
CGoGN
Commits
2cb08372
Commit
2cb08372
authored
Feb 04, 2014
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small adds in OBJ import
parent
949f5539
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
include/Algo/Import/importObjTex.h
include/Algo/Import/importObjTex.h
+7
-1
include/Algo/Import/importObjTex.hpp
include/Algo/Import/importObjTex.hpp
+16
-0
No files found.
include/Algo/Import/importObjTex.h
View file @
2cb08372
...
...
@@ -369,7 +369,13 @@ public:
*/
bool
createGroupMatVBO_PTN
(
Utils
::
VBO
*
positionVBO
,
Utils
::
VBO
*
texcoordVBO
,
Utils
::
VBO
*
normalVBO
);
/**
* @brief add a dart by each face of group in a vector
* @param groupId the group to add
* @param dartFaces the vector in which we want to add
* @return the number of faces added.
*/
unsigned
int
storeFacesOfGroup
(
unsigned
int
groupId
,
std
::
vector
<
Dart
>&
dartFaces
);
};
...
...
include/Algo/Import/importObjTex.hpp
View file @
2cb08372
...
...
@@ -1395,6 +1395,22 @@ bool OBJModel<PFP>::import( const std::string& filename, std::vector<std::string
}
template
<
typename
PFP
>
unsigned
int
OBJModel
<
PFP
>::
storeFacesOfGroup
(
unsigned
int
groupId
,
std
::
vector
<
Dart
>&
dartFaces
)
{
unsigned
int
nb
=
dartFaces
.
size
();
TraversorF
<
typename
PFP
::
MAP
>
traf
(
m_map
);
for
(
Dart
d
=
traf
.
begin
();
d
!=
traf
.
end
();
d
=
traf
.
next
())
{
if
(
m_groups
[
d
]
==
groupId
)
{
dartFaces
.
push_back
(
d
);
}
}
return
dartFaces
.
size
()
-
nb
;
}
}
...
...
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