Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OpenGL
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
C-Fu
OpenGL
Commits
be97fa8e
Commit
be97fa8e
authored
Oct 22, 2016
by
Anakin
Browse files
Options
Downloads
Patches
Plain Diff
fixed crash problem
parent
c0a84c75
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
MshViewer/Header/Object.h
+1
-1
1 addition, 1 deletion
MshViewer/Header/Object.h
MshViewer/Source/Object.cpp
+9
-8
9 additions, 8 deletions
MshViewer/Source/Object.cpp
with
10 additions
and
9 deletions
MshViewer/Header/Object.h
+
1
−
1
View file @
be97fa8e
...
...
@@ -61,7 +61,7 @@ private:
void
setModlDefault
(
Modl
*
model
);
void
loadChunks
(
std
::
list
<
ChunkHeader
*>
&
destination
,
std
::
streampos
start
,
const
std
::
uint32_t
end
);
void
analyseMsh2Chunks
(
std
::
list
<
ChunkHeader
*>
&
chunkList
);
void
analyseMatdChunks
(
Modl
*
dataDestination
,
std
::
list
<
ChunkHeader
*>
&
chunkList
);
void
analyseMatdChunks
(
std
::
list
<
ChunkHeader
*>
&
chunkList
);
void
analyseModlChunks
(
Modl
*
dataDestination
,
std
::
list
<
ChunkHeader
*>
&
chunkList
);
void
analyseGeomChunks
(
Modl
*
dataDestination
,
std
::
list
<
ChunkHeader
*>
&
chunkList
);
void
analyseSegmChunks
(
Modl
*
dataDestination
,
std
::
list
<
ChunkHeader
*>
&
chunkList
);
...
...
...
...
This diff is collapsed.
Click to expand it.
MshViewer/Source/Object.cpp
+
9
−
8
View file @
be97fa8e
...
...
@@ -133,9 +133,6 @@ void Object::analyseMsh2Chunks(std::list<ChunkHeader*>& chunkList)
{
for
(
std
::
list
<
ChunkHeader
*>::
iterator
it
=
chunkList
.
begin
();
it
!=
chunkList
.
end
();
it
++
)
{
Modl
*
tempModl
=
new
Modl
;
setModlDefault
(
tempModl
);
if
(
!
strcmp
(
"MATL"
,
(
*
it
)
->
name
))
{
// get all MATD from MATL list
...
...
@@ -153,7 +150,7 @@ void Object::analyseMsh2Chunks(std::list<ChunkHeader*>& chunkList)
loadChunks
(
tempMatdChunks
,
(
*
it
)
->
position
,
(
*
it
)
->
size
);
// analyse MATD subchunks
analyseMatdChunks
(
tempModl
,
tempMatdChunks
);
analyseMatdChunks
(
tempMatdChunks
);
// clean up
while
(
!
tempMatdChunks
.
empty
())
...
...
@@ -178,6 +175,10 @@ void Object::analyseMsh2Chunks(std::list<ChunkHeader*>& chunkList)
if
(
!
strcmp
(
"MODL"
,
(
*
it
)
->
name
))
{
Modl
*
tempModl
=
new
Modl
;
setModlDefault
(
tempModl
);
// get all subchunks
std
::
list
<
ChunkHeader
*>
tempChunks
;
loadChunks
(
tempChunks
,
(
*
it
)
->
position
,
(
*
it
)
->
size
);
...
...
@@ -193,15 +194,15 @@ void Object::analyseMsh2Chunks(std::list<ChunkHeader*>& chunkList)
delete
tempCursor
;
}
continue
;
}
// save Model data
lModls
.
push_back
(
tempModl
);
continue
;
}
}
}
void
Object
::
analyseMatdChunks
(
Modl
*
dataDestination
,
std
::
list
<
ChunkHeader
*>&
chunkList
)
void
Object
::
analyseMatdChunks
(
std
::
list
<
ChunkHeader
*>&
chunkList
)
{
for
(
std
::
list
<
ChunkHeader
*>::
iterator
it
=
chunkList
.
begin
();
it
!=
chunkList
.
end
();
it
++
)
{
...
...
...
...
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
sign in
to comment