Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Analyst WebApp
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
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
fidentis
Analyst WebApp
Commits
94e0f2c8
There was an error fetching the commit references. Please try again later.
Commit
94e0f2c8
authored
2 years ago
by
Radek Ošlejšek
Browse files
Options
Downloads
Patches
Plain Diff
Added drawable line
parent
befdabbe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GUI/src/main/java/cz/fidentis/analyst/scene/DrawableLine.java
+36
-0
36 additions, 0 deletions
...src/main/java/cz/fidentis/analyst/scene/DrawableLine.java
with
36 additions
and
0 deletions
GUI/src/main/java/cz/fidentis/analyst/scene/DrawableLine.java
0 → 100644
+
36
−
0
View file @
94e0f2c8
package
cz.fidentis.analyst.scene
;
import
com.jogamp.opengl.GL2
;
import
javax.vecmath.Point3d
;
/**
* A line to be shown in the scene, e.g., to show a ray.
*
* @author Radek Oslejsek
*/
public
class
DrawableLine
extends
Drawable
{
private
final
Point3d
startPoint
;
private
final
Point3d
endPoint
;
/**
* Constructor.
*
* @param start Start point
* @param end End point
*/
public
DrawableLine
(
Point3d
start
,
Point3d
end
)
{
this
.
startPoint
=
start
;
this
.
endPoint
=
end
;
}
@Override
protected
void
renderObject
(
GL2
gl
)
{
gl
.
glBegin
(
GL2
.
GL_LINES
);
gl
.
glVertex3d
(
startPoint
.
x
,
startPoint
.
y
,
startPoint
.
z
);
gl
.
glVertex3d
(
endPoint
.
x
,
endPoint
.
y
,
endPoint
.
z
);
gl
.
glEnd
();
}
}
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