Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Niflib
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Grant Kim
Niflib
Commits
4aec784a
Commit
4aec784a
authored
13 years ago
by
Alecu100
Browse files
Options
Downloads
Patches
Plain Diff
more fixes to niflib, last commit didn't submit the complexshape updates
parent
30afda29
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/ComplexShape.h
+2
-1
2 additions, 1 deletion
include/ComplexShape.h
src/ComplexShape.cpp
+2
-2
2 additions, 2 deletions
src/ComplexShape.cpp
with
4 additions
and
3 deletions
include/ComplexShape.h
+
2
−
1
View file @
4aec784a
...
@@ -177,7 +177,8 @@ public:
...
@@ -177,7 +177,8 @@ public:
Matrix44
&
transform
,
Matrix44
&
transform
,
int
max_bones_per_partition
=
4
,
int
max_bones_per_partition
=
4
,
bool
stripify
=
false
,
bool
stripify
=
false
,
bool
tangent_space
=
false
bool
tangent_space
=
false
,
float
min_vertex_weight
=
0.001
f
)
const
;
)
const
;
/*
/*
...
...
This diff is collapsed.
Click to expand it.
src/ComplexShape.cpp
+
2
−
2
View file @
4aec784a
...
@@ -526,7 +526,7 @@ void ComplexShape::Merge( NiAVObject * root ) {
...
@@ -526,7 +526,7 @@ void ComplexShape::Merge( NiAVObject * root ) {
//Done Merging
//Done Merging
}
}
Ref
<
NiAVObject
>
ComplexShape
::
Split
(
NiNode
*
parent
,
Matrix44
&
transform
,
int
max_bones_per_partition
,
bool
stripify
,
bool
tangent_space
)
const
{
Ref
<
NiAVObject
>
ComplexShape
::
Split
(
NiNode
*
parent
,
Matrix44
&
transform
,
int
max_bones_per_partition
,
bool
stripify
,
bool
tangent_space
,
float
min_vertex_weight
)
const
{
//Make sure parent is not NULL
//Make sure parent is not NULL
if
(
parent
==
NULL
)
{
if
(
parent
==
NULL
)
{
...
@@ -744,7 +744,7 @@ Ref<NiAVObject> ComplexShape::Split( NiNode * parent, Matrix44 & transform, int
...
@@ -744,7 +744,7 @@ Ref<NiAVObject> ComplexShape::Split( NiNode * parent, Matrix44 & transform, int
SkinWeight
sk
;
SkinWeight
sk
;
for
(
map
<
NiNodeRef
,
float
>::
iterator
wt
=
cv
->
weights
.
begin
();
wt
!=
cv
->
weights
.
end
();
++
wt
)
{
for
(
map
<
NiNodeRef
,
float
>::
iterator
wt
=
cv
->
weights
.
begin
();
wt
!=
cv
->
weights
.
end
();
++
wt
)
{
//Only record influences that make a noticable contribution
//Only record influences that make a noticable contribution
if
(
wt
->
second
>
0.1
f
)
{
if
(
wt
->
second
>
min_vertex_weight
)
{
sk
.
index
=
vert_index
;
sk
.
index
=
vert_index
;
sk
.
weight
=
wt
->
second
;
sk
.
weight
=
wt
->
second
;
if
(
shapeWeights
.
find
(
wt
->
first
)
==
shapeWeights
.
end
()
)
{
if
(
shapeWeights
.
find
(
wt
->
first
)
==
shapeWeights
.
end
()
)
{
...
...
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