Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
6b1d835f
Commit
6b1d835f
authored
11 years ago
by
Jonathan Yap
Browse files
Options
Downloads
Patches
Plain Diff
STORM-1981 Rough initial changes for evaluation purposes.
parent
ea1e1b09
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
doc/contributions.txt
+1
-0
1 addition, 0 deletions
doc/contributions.txt
indra/newview/lltracker.cpp
+76
-11
76 additions, 11 deletions
indra/newview/lltracker.cpp
with
77 additions
and
11 deletions
doc/contributions.txt
+
1
−
0
View file @
6b1d835f
...
@@ -674,6 +674,7 @@ Jonathan Yap
...
@@ -674,6 +674,7 @@ Jonathan Yap
OPEN-161
OPEN-161
STORM-1953
STORM-1953
STORM-1957
STORM-1957
STORM-1981
Kadah Coba
Kadah Coba
STORM-1060
STORM-1060
STORM-1843
STORM-1843
...
...
This diff is collapsed.
Click to expand it.
indra/newview/lltracker.cpp
+
76
−
11
View file @
6b1d835f
...
@@ -412,7 +412,7 @@ const std::string& LLTracker::getTrackedLocationName()
...
@@ -412,7 +412,7 @@ const std::string& LLTracker::getTrackedLocationName()
return
instance
()
->
mTrackedLocationName
;
return
instance
()
->
mTrackedLocationName
;
}
}
F32
pulse_func
(
F32
t
,
F32
z
)
F32
pulse_func
(
F32
t
,
F32
z
,
bool
tracking_avatar
)
{
{
if
(
!
LLTracker
::
sCheesyBeacon
)
if
(
!
LLTracker
::
sCheesyBeacon
)
{
{
...
@@ -420,7 +420,14 @@ F32 pulse_func(F32 t, F32 z)
...
@@ -420,7 +420,14 @@ F32 pulse_func(F32 t, F32 z)
}
}
t
*=
F_PI
;
t
*=
F_PI
;
if
(
tracking_avatar
)
{
z
+=
t
*
64.
f
-
256.
f
;
}
else
{
z
-=
t
*
64.
f
-
256.
f
;
z
-=
t
*
64.
f
-
256.
f
;
}
F32
a
=
cosf
(
z
*
F_PI
/
512.
f
)
*
10.0
f
;
F32
a
=
cosf
(
z
*
F_PI
/
512.
f
)
*
10.0
f
;
a
=
llmax
(
a
,
9.9
f
);
a
=
llmax
(
a
,
9.9
f
);
...
@@ -497,9 +504,11 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
...
@@ -497,9 +504,11 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
}
}
LLColor4
fogged_color
=
color_frac
*
color
+
(
1
-
color_frac
)
*
gSky
.
getFogColor
();
LLColor4
fogged_color
=
color_frac
*
color
+
(
1
-
color_frac
)
*
gSky
.
getFogColor
();
LLColor4
under_color
=
color_frac
*
LLColor4
::
blue
+
(
1
-
color_frac
)
*
gSky
.
getFogColor
();
F32
FADE_DIST
=
3.
f
;
F32
FADE_DIST
=
3.
f
;
fogged_color
.
mV
[
3
]
=
llmax
(
0.2
f
,
llmin
(
0.5
f
,(
dist
-
FADE_DIST
)
/
FADE_DIST
));
fogged_color
.
mV
[
3
]
=
llmax
(
0.2
f
,
llmin
(
0.5
f
,(
dist
-
FADE_DIST
)
/
FADE_DIST
));
under_color
.
mV
[
3
]
=
llmax
(
0.2
f
,
llmin
(
0.5
f
,(
dist
-
FADE_DIST
)
/
FADE_DIST
));
LLVector3
pos_agent
=
gAgent
.
getPosAgentFromGlobal
(
pos_global
);
LLVector3
pos_agent
=
gAgent
.
getPosAgentFromGlobal
(
pos_global
);
...
@@ -508,7 +517,6 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
...
@@ -508,7 +517,6 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
LLGLDisable
cull_face
(
GL_CULL_FACE
);
LLGLDisable
cull_face
(
GL_CULL_FACE
);
LLGLDepthTest
gls_depth
(
GL_TRUE
,
GL_FALSE
);
LLGLDepthTest
gls_depth
(
GL_TRUE
,
GL_FALSE
);
gGL
.
matrixMode
(
LLRender
::
MM_MODELVIEW
);
gGL
.
matrixMode
(
LLRender
::
MM_MODELVIEW
);
gGL
.
pushMatrix
();
gGL
.
pushMatrix
();
{
{
...
@@ -518,7 +526,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
...
@@ -518,7 +526,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
gGL
.
color4fv
(
fogged_color
.
mV
);
gGL
.
color4fv
(
fogged_color
.
mV
);
const
U32
BEACON_VERTS
=
256
;
const
U32
BEACON_VERTS
=
256
;
const
F32
step
=
1
02
4
.0
f
/
BEACON_VERTS
;
const
F32
step
=
(
5
02
0
.0
f
-
pos_agent
.
mV
[
2
])
/
BEACON_VERTS
;
LLVector3
x_axis
=
LLViewerCamera
::
getInstance
()
->
getLeftAxis
();
LLVector3
x_axis
=
LLViewerCamera
::
getInstance
()
->
getLeftAxis
();
F32
t
=
gRenderStartTime
.
getElapsedTimeF32
();
F32
t
=
gRenderStartTime
.
getElapsedTimeF32
();
...
@@ -532,8 +540,9 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
...
@@ -532,8 +540,9 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
F32
z
=
i
*
step
;
F32
z
=
i
*
step
;
F32
z_next
=
(
i
+
1
)
*
step
;
F32
z_next
=
(
i
+
1
)
*
step
;
F32
a
=
pulse_func
(
t
,
z
);
bool
tracking_avatar
=
getTrackingStatus
()
==
TRACKING_AVATAR
;
F32
an
=
pulse_func
(
t
,
z_next
);
F32
a
=
pulse_func
(
t
,
z
,
tracking_avatar
);
F32
an
=
pulse_func
(
t
,
z_next
,
tracking_avatar
);
LLColor4
c_col
=
fogged_color
+
LLColor4
(
a
,
a
,
a
,
a
);
LLColor4
c_col
=
fogged_color
+
LLColor4
(
a
,
a
,
a
,
a
);
LLColor4
col_next
=
fogged_color
+
LLColor4
(
an
,
an
,
an
,
an
);
LLColor4
col_next
=
fogged_color
+
LLColor4
(
an
,
an
,
an
,
an
);
...
@@ -561,7 +570,63 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
...
@@ -561,7 +570,63 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
gGL
.
vertex3f
(
x
*
a
,
y
*
a
,
z
);
gGL
.
vertex3f
(
x
*
a
,
y
*
a
,
z
);
gGL
.
color4fv
(
col_edge_next
.
mV
);
gGL
.
color4fv
(
col_edge_next
.
mV
);
gGL
.
vertex3f
(
x
*
an
,
y
*
an
,
z_next
);
gGL
.
vertex3f
(
x
*
an
,
y
*
an
,
z_next
);
gGL
.
end
();
}
}
gGL
.
popMatrix
();
gGL
.
pushMatrix
();
{
gGL
.
translatef
(
pos_agent
.
mV
[
0
],
pos_agent
.
mV
[
1
],
0
);
// draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, under_color);
gGL
.
color4fv
(
under_color
.
mV
);
const
U32
BEACON_VERTS
=
256
;
const
F32
step
=
pos_agent
.
mV
[
2
]
/
BEACON_VERTS
;
LLVector3
x_axis
=
LLViewerCamera
::
getInstance
()
->
getLeftAxis
();
F32
t
=
gRenderStartTime
.
getElapsedTimeF32
();
F32
dr
=
dist
/
LLViewerCamera
::
getInstance
()
->
getFar
();
for
(
U32
i
=
0
;
i
<
BEACON_VERTS
;
i
++
)
{
F32
x
=
x_axis
.
mV
[
0
];
F32
y
=
x_axis
.
mV
[
1
];
F32
z
=
i
*
step
;
F32
z_next
=
(
i
+
1
)
*
step
;
bool
tracking_avatar
=
getTrackingStatus
()
==
TRACKING_AVATAR
;
F32
a
=
pulse_func
(
t
,
z
,
tracking_avatar
);
F32
an
=
pulse_func
(
t
,
z_next
,
tracking_avatar
);
LLColor4
c_col
=
under_color
+
LLColor4
(
a
,
a
,
a
,
a
);
LLColor4
col_next
=
under_color
+
LLColor4
(
an
,
an
,
an
,
an
);
LLColor4
col_edge
=
under_color
*
LLColor4
(
a
,
a
,
a
,
0.0
f
);
LLColor4
col_edge_next
=
under_color
*
LLColor4
(
an
,
an
,
an
,
0.0
f
);
a
*=
2.
f
;
a
+=
1.0
f
+
dr
;
an
*=
2.
f
;
an
+=
1.0
f
+
dr
;
gGL
.
begin
(
LLRender
::
TRIANGLE_STRIP
);
gGL
.
color4fv
(
col_edge
.
mV
);
gGL
.
vertex3f
(
-
x
*
a
,
-
y
*
a
,
z
);
gGL
.
color4fv
(
col_edge_next
.
mV
);
gGL
.
vertex3f
(
-
x
*
an
,
-
y
*
an
,
z_next
);
gGL
.
color4fv
(
c_col
.
mV
);
gGL
.
vertex3f
(
0
,
0
,
z
);
gGL
.
color4fv
(
col_next
.
mV
);
gGL
.
vertex3f
(
0
,
0
,
z_next
);
gGL
.
color4fv
(
col_edge
.
mV
);
gGL
.
vertex3f
(
x
*
a
,
y
*
a
,
z
);
gGL
.
color4fv
(
col_edge_next
.
mV
);
gGL
.
vertex3f
(
x
*
an
,
y
*
an
,
z_next
);
gGL
.
end
();
gGL
.
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