Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
00a7f397
Commit
00a7f397
authored
Jul 11, 1995
by
Ken Martin
Browse files
fixed scalar copying bug
parent
c811711d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Glyph3D.cc
View file @
00a7f397
...
@@ -181,20 +181,19 @@ void vtkGlyph3D::Execute()
...
@@ -181,20 +181,19 @@ void vtkGlyph3D::Execute()
if
(
inScalars
!=
NULL
)
if
(
inScalars
!=
NULL
)
{
{
// Copy Input scalar
// Copy Input scalar
for
(
i
=
0
;
i
<
numSourcePts
;
i
++
)
scale
=
inScalars
->
GetScalar
(
inPtId
);
newScalars
->
InsertScalar
(
ptIncr
+
i
,
scale
);
if
(
this
->
ScaleMode
==
SCALE_BY_SCALAR
)
if
(
this
->
ScaleMode
==
SCALE_BY_SCALAR
)
{
{
if
(
(
den
=
this
->
Range
[
1
]
-
this
->
Range
[
0
])
==
0.0
)
den
=
1.0
;
if
(
(
den
=
this
->
Range
[
1
]
-
this
->
Range
[
0
])
==
0.0
)
den
=
1.0
;
scale
=
inScalars
->
GetScalar
(
inPtId
);
scale
=
(
scale
<
this
->
Range
[
0
]
?
this
->
Range
[
0
]
:
scale
=
(
scale
<
this
->
Range
[
0
]
?
this
->
Range
[
0
]
:
(
scale
>
this
->
Range
[
1
]
?
this
->
Range
[
1
]
:
scale
));
(
scale
>
this
->
Range
[
1
]
?
this
->
Range
[
1
]
:
scale
));
scale
=
(
scale
-
this
->
Range
[
0
])
/
den
;
scale
=
(
scale
-
this
->
Range
[
0
])
/
den
;
}
}
for
(
i
=
0
;
i
<
numSourcePts
;
i
++
)
newScalars
->
InsertScalar
(
ptIncr
+
i
,
scale
);
}
}
// scale data if appropriate
// scale data if appropriate
...
...
Write
Preview
Supports
Markdown
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