Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MUG
visad
Commits
c55794d2
Commit
c55794d2
authored
Sep 20, 2018
by
rink
Browse files
add a trajectory form for tracer display only
parent
9b6b8b9d
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/src/visad/TrajectoryManager.java
View file @
c55794d2
...
...
@@ -77,6 +77,8 @@ public class TrajectoryManager {
public
static
final
int
CYLINDER
=
TrajectoryParams
.
CYLINDER
;
public
static
final
int
DEFORM_RIBBON
=
TrajectoryParams
.
DEFORM_RIBBON
;
public
static
final
int
POINT
=
TrajectoryParams
.
POINT
;
public
static
final
int
TRACER
=
TrajectoryParams
.
TRACER
;
public
static
final
int
TRACER_POINT
=
TrajectoryParams
.
TRACER_POINT
;
public
static
final
String
PPOP_TRAJECTORY_START_POINTS_FILE
=
"visad.trajectory.startPointsFile"
;
public
static
final
String
PROP_TRAJECTORY_PARAM_FILE_1
=
"visad.trajectory.paramFile1"
;
...
...
@@ -2438,6 +2440,12 @@ public class TrajectoryManager {
else
if
(
propStr
.
equals
(
"POINT"
))
{
trajParams
.
setTrajectoryForm
(
TrajectoryParams
.
POINT
);
}
else
if
(
propStr
.
equals
(
"TRACER"
))
{
trajParams
.
setTrajectoryForm
(
TrajectoryParams
.
TRACER
);
}
else
if
(
propStr
.
equals
(
"TRACER_POINT"
))
{
trajParams
.
setTrajectoryForm
(
TrajectoryParams
.
TRACER_POINT
);
}
}
propStr
=
prop
.
getProperty
(
"Method"
);
...
...
core/src/visad/TrajectoryParams.java
View file @
c55794d2
...
...
@@ -64,6 +64,8 @@ public class TrajectoryParams {
public
static
final
int
CYLINDER
=
2
;
public
static
final
int
DEFORM_RIBBON
=
3
;
public
static
final
int
POINT
=
4
;
public
static
final
int
TRACER
=
5
;
public
static
final
int
TRACER_POINT
=
6
;
double
trajVisibilityTimeWindow
=
86400.0
;
double
trajRefreshInterval
=
86400.0
;
...
...
core/src/visad/java3d/ShadowFunctionOrSetTypeJ3D.java
View file @
c55794d2
...
...
@@ -1407,6 +1407,9 @@ System.out.println("Texture.BASE_LEVEL_LINEAR = " + Texture.BASE_LEVEL_LINEAR);
TrajectoryManager
trajMan
=
new
TrajectoryManager
(
renderer
,
trajParams
,
flowInfoList
,
dataDomainLength
,
times
[
0
],
altitudeToDisplayZ
,
dspCoordSys
);
trcrEnabled
=
(
trcrEnabled
&&
(
trajForm
==
TrajectoryManager
.
LINE
))
&&
trajForm
!=
TrajectoryManager
.
POINT
;
if
(
trajForm
==
TrajectoryManager
.
TRACER
||
trajForm
==
TrajectoryManager
.
TRACER_POINT
)
{
trcrEnabled
=
true
;
}
if
(
autoSizeTrcr
&&
trcrEnabled
)
{
listener
=
new
FixGeomSizeAppearanceJ3D
(
pCntrl
,
this
,
mouseBehav
);
...
...
@@ -1442,12 +1445,18 @@ System.out.println("Texture.BASE_LEVEL_LINEAR = " + Texture.BASE_LEVEL_LINEAR);
arrays
=
trajMan
.
computeTrajectories
(
k
,
timeAccum
,
times
,
timeSteps
);
if
(
trajMan
.
getNumberOfTrajectories
()
>
0
)
{
achrArrays
=
new
ArrayList
<
float
[]>();
trcrArray
=
trajMan
.
makeTracerGeometry
(
achrArrays
,
direction
,
trcrSize
,
dspScale
,
true
);
trcrArray
=
TrajectoryManager
.
scaleGeometry
(
trcrArray
,
achrArrays
,
(
float
)(
1.0
/
scale
));
if
(
trajForm
==
TrajectoryManager
.
TRACER_POINT
)
{
trcrArray
=
trajMan
.
makePointGeometry
();
}
else
{
achrArrays
=
new
ArrayList
<
float
[]>();
trcrArray
=
trajMan
.
makeTracerGeometry
(
achrArrays
,
direction
,
trcrSize
,
dspScale
,
true
);
trcrArray
=
TrajectoryManager
.
scaleGeometry
(
trcrArray
,
achrArrays
,
(
float
)(
1.0
/
scale
));
}
}
GraphicsModeControl
mode
=
(
GraphicsModeControl
)
info
.
mode
.
clone
();
mode
.
setPointSize
(
5
f
,
false
);
if
((
k
==
0
)
||
(
timeAccum
>=
trajRefreshInterval
))
{
// for non steady state trajectories (refresh frequency)
avHandler
.
setNoneVisibleIndex
(
i
);
...
...
@@ -1458,19 +1467,23 @@ System.out.println("Texture.BASE_LEVEL_LINEAR = " + Texture.BASE_LEVEL_LINEAR);
if
(
trcrEnabled
)
{
Object
group
=
switB
.
getChild
(
i
);
BranchGroup
trcrBG
=
addToDetachableGroup
(
group
,
trcrArray
,
mode
,
info
.
constant_alpha
,
info
.
constant_color
);
if
(
listener
!=
null
&&
trcrArray
!=
null
)
{
if
(
listener
!=
null
&&
trcrArray
!=
null
&&
achrArrays
!=
null
)
{
listener
.
add
(
trcrBG
,
trcrArray
,
achrArrays
,
mode
,
info
.
constant_alpha
,
info
.
constant_color
);
}
}
BranchGroup
branch
=
(
BranchGroup
)
branches
.
get
(
i
);
addToGroup
(
branch
,
arrays
[
0
],
mode
,
info
.
constant_alpha
,
info
.
constant_color
);
if
(
trajForm
==
TrajectoryManager
.
CYLINDER
)
{
// cylinder elbows
addToGroup
(
branch
,
arrays
[
2
],
mode
,
info
.
constant_alpha
,
info
.
constant_color
);
}
BranchGroup
node
=
(
BranchGroup
)
swit
.
getChild
(
i
);
node
.
addChild
(
branch
);
if
(
trajForm
!=
TrajectoryManager
.
TRACER
&&
trajForm
!=
TrajectoryManager
.
TRACER_POINT
)
{
BranchGroup
node
=
(
BranchGroup
)
swit
.
getChild
(
i
);
node
.
addChild
(
branch
);
}
if
(
trajForm
==
TrajectoryManager
.
CYLINDER
)
{
BranchGroup
auxBrnch
=
(
BranchGroup
)
makeBranch
();
...
...
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