Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
85440360
Commit
85440360
authored
Nov 16, 2012
by
Kenneth Vanhoey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correction in read of importPlySLFgenericBin
parent
a76f5609
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
+25
-14
include/Algo/Import/import2tablesSurface.hpp
include/Algo/Import/import2tablesSurface.hpp
+25
-14
No files found.
include/Algo/Import/import2tablesSurface.hpp
View file @
85440360
...
...
@@ -1010,12 +1010,21 @@ bool MeshTablesSurface<PFP>::importPlySLFgenericBin(const std::string& filename,
attrNames
.
push_back
(
positions
.
name
())
;
VertexAttribute
<
typename
PFP
::
VEC3
>
*
frame
=
new
VertexAttribute
<
typename
PFP
::
VEC3
>
[
3
]
;
frame[0] = m_map.template addAttribute<typename PFP::VEC3, VERTEX>("frameT") ; // Tangent
frame[1] = m_map.template addAttribute<typename PFP::VEC3, VERTEX>("frameB") ; // Bitangent
frame[2] = m_map.template addAttribute<typename PFP::VEC3, VERTEX>("frameN") ; // Normal
attrNames.push_back(frame[0].name()) ;
attrNames.push_back(frame[1].name()) ;
attrNames.push_back(frame[2].name()) ;
if
(
tangent
)
{
frame
[
0
]
=
m_map
.
template
addAttribute
<
typename
PFP
::
VEC3
,
VERTEX
>(
"frameT"
)
;
// Tangent
attrNames
.
push_back
(
frame
[
0
].
name
())
;
}
if
(
binormal
)
{
frame
[
1
]
=
m_map
.
template
addAttribute
<
typename
PFP
::
VEC3
,
VERTEX
>(
"frameB"
)
;
// Bitangent
attrNames
.
push_back
(
frame
[
0
].
name
())
;
}
if
(
normal
)
{
frame
[
2
]
=
m_map
.
template
addAttribute
<
typename
PFP
::
VEC3
,
VERTEX
>(
"frameN"
)
;
// Normal
attrNames
.
push_back
(
frame
[
0
].
name
())
;
}
VertexAttribute
<
typename
PFP
::
VEC3
>
*
PBcoefs
=
NULL
,
*
SHcoefs
=
NULL
;
if
(
PTM
)
...
...
@@ -1064,14 +1073,15 @@ bool MeshTablesSurface<PFP>::importPlySLFgenericBin(const std::string& filename,
fp
.
read
((
char
*
)
properties
,
nbProps
*
propSize
)
;
positions[id] = VEC3(properties[0],properties[1],properties[2]) ; // position
for (unsigned int k = 0 ; k < 3 ; ++k) // frame
for (unsigned int l = 0 ; l < 3 ; ++l)
frame[k][id][l] = (typename PFP::REAL)(properties[3+(3*k+l)]) ;
/*
for (unsigned int k = 0 ; k < 3 ; ++k) // coefficients
for (unsigned int l = 0 ; l < nbCoefs ; ++l)
*/
// positions
if
(
nbProps
>
2
)
positions
[
id
]
=
VEC3
(
properties
[
0
],
properties
[
1
],
properties
[
2
])
;
// position
if
(
tangent
&&
binormal
&&
normal
)
// == if (nbprops > 11)
for
(
unsigned
int
k
=
0
;
k
<
3
;
++
k
)
// frame
for
(
unsigned
int
l
=
0
;
l
<
3
;
++
l
)
frame
[
k
][
id
][
l
]
=
(
typename
PFP
::
REAL
)(
properties
[
3
+
(
3
*
k
+
l
)])
;
for
(
unsigned
int
l
=
0
;
l
<
nbCoefs
;
++
l
)
// coefficients
for
(
unsigned
int
k
=
0
;
k
<
3
;
++
k
)
{
...
...
@@ -1080,6 +1090,7 @@ bool MeshTablesSurface<PFP>::importPlySLFgenericBin(const std::string& filename,
else
/* if SH */
SHcoefs
[
l
][
id
][
k
]
=
(
typename
PFP
::
REAL
)(
properties
[
12
+
(
3
*
l
+
k
)])
;
}
unsigned
int
cur
=
12
+
3
*
nbCoefs
;
for
(
unsigned
int
k
=
0
;
k
<
nbRemainders
;
++
k
)
// remaining data
remainders
[
k
][
id
]
=
(
typename
PFP
::
REAL
)(
properties
[
cur
+
k
])
;
...
...
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