Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
vite
Commits
e7434a41
Commit
e7434a41
authored
Jul 16, 2014
by
Thibault Soucarre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add counters
parent
338e0166
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
src/render/Render_alternate.cpp
src/render/Render_alternate.cpp
+10
-0
src/trace/DrawTrace.hpp
src/trace/DrawTrace.hpp
+13
-12
No files found.
src/render/Render_alternate.cpp
View file @
e7434a41
...
...
@@ -199,6 +199,16 @@ void Render_alternate::paintGL(){
glUniformMatrix4fv
(
glGetUniformLocation
(
_shader
.
getProgramID
(),
"projection"
),
1
,
GL_FALSE
,
glm
::
value_ptr
(
_projection
));
glDrawArrays
(
GL_QUADS
,
0
,
_states
.
getNbVertex
());
_states
.
unlock
();
//_modelview = tmp;
/*drawing counters*/
_counters
.
lock
();
//_modelview = glm::translate(_modelview, glm::vec3(0.0, _ruler_y + _ruler_height - _y_state_translate, _z_container));
//_modelview = glm::scale(_modelview, glm::vec3(_x_scale_container_state/0.20, _y_state_scale, 1.0));
//glUniformMatrix4fv(glGetUniformLocation(_shader.getProgramID(), "modelview"), 1, GL_FALSE, glm::value_ptr(_modelview));
//glUniformMatrix4fv(glGetUniformLocation(_shader.getProgramID(), "projection"), 1, GL_FALSE, glm::value_ptr(_projection));
glDrawArrays
(
GL_LINES
,
0
,
_counters
.
getNbVertex
());
_counters
.
unlock
();
_modelview
=
tmp
;
/*drawing links*/
...
...
src/trace/DrawTrace.hpp
View file @
e7434a41
...
...
@@ -287,7 +287,7 @@ public:
i
++
)
// Use the fact that if a container is selected, then it implies that all his ancestors are
if
(
is_in_set
(
*
i
,
container
))
y
+=
browse_container
(
draw_object
,
*
i
,
0.
,
y
,
_container_width
,
0.
,
container
);
y
+=
browse_container
(
draw_object
,
*
i
,
0.
,
y
,
_container_width
,
0.
,
container
)
+
_container_v_space
;
}
}
/* end browse_container_tree */
...
...
@@ -315,6 +315,7 @@ public:
i
++
)
{
h
+=
browse_container
(
draw_object
,
(
*
i
),
x
+
_container_width
+
_container_h_space
,
y
+
h
,
_container_width
,
0.
,
set_container
)
+
_container_v_space
;
}
// h -= _container_v_space;
/*if(is_in_set(*i,set_container))
size += browse_container(draw_object, (*i), position+size, depth+1,set_container);*/
...
...
@@ -333,18 +334,16 @@ public:
}
// Store the position to draw links
_container_positions
[
container
]
=
y
;
_container_sizes
[
container
]
=
h
;
// Use one line for each variable
if
(
container
->
get_variable_number
()
>
0
)
{
_variable_containers
.
push_back
(
container
);
h
+=
(
_container_height
+
_container_v_space
)
*
container
->
get_variable_number
();
}
// Store the position to draw links
_container_positions
[
container
]
=
y
;
_container_sizes
[
container
]
=
h
;
h
-=
_container_v_space
;
if
(
h
<
_container_height
)
// Minimum size
h
=
_container_height
;
...
...
@@ -352,6 +351,8 @@ public:
if
(
!
container
->
get_links
()
->
empty
())
_link_containers
.
push_back
(
container
);
h
-=
_container_v_space
;
// Draw this container
draw_container
(
draw_object
,
x
,
y
,
w
,
h
,
container
->
get_name
().
to_string
());
...
...
@@ -529,8 +530,8 @@ public:
double
first_value
=
0.
;
double
second_value
=
0.
;
draw_object
->
draw_text_value
((
long
int
)
var
,
0.0
,
(
position
+
1
)
*
(
_container_height
+
_container_v_space
)
-
_container_v_space
/
2
-
0.5
*
_container_height
);
//draw_object->draw_text_value((long int)var,0.0, (position+1)*(_container_height+_container_v_space) - _container_v_space/2 - 0.5*_container_height);
draw_object
->
draw_text_value
((
long
int
)
var
,
0.0
,
position
+
0.5
*
_container_height
+
_container_v_space
/
2
);
_var_positions
[
var
]
=
position
;
draw_variable_value
(
draw_object
,
0.0
,
0.0
,
position
);
for
(
std
::
list
<
std
::
pair
<
Date
,
Double
>
>::
const_iterator
value
=
variable_values
->
begin
();
...
...
@@ -546,7 +547,7 @@ public:
}
}
draw_variable_value
(
draw_object
,
0.0
,
0.0
,
position
);
position
++
;
// One line was used
position
+=
_container_height
+
_container_v_space
;
// One line was used
}
/* end for */
}
}
//end for
...
...
@@ -563,8 +564,8 @@ public:
* \param position Line where the variable is drawn
*/
template
<
class
T
>
inline
void
draw_variable_value
(
T
*
draw_object
,
double
time
,
double
value
,
int
position
)
{
Element_pos
y
=
position
+
(
_container_height
+
_container_v_space
)
-
_container_v_space
/
2
-
inline
void
draw_variable_value
(
T
*
draw_object
,
double
time
,
double
value
,
Element_pos
position
)
{
Element_pos
y
=
position
+
(
_container_height
+
_container_v_space
)
-
_container_v_space
/
2
-
value
*
_container_height
;
draw_object
->
draw_counter
(
time
,
y
);
}
...
...
Write
Preview
Markdown
is supported
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