IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
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
Pranav Sampathkumar
corsika
Commits
d88b1073
Commit
d88b1073
authored
3 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
remove unused file
parent
785332c9
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
corsika/detail/modules/TrackingLine.inl
+0
-59
0 additions, 59 deletions
corsika/detail/modules/TrackingLine.inl
with
0 additions
and
59 deletions
corsika/detail/modules/TrackingLine.inl
deleted
100644 → 0
+
0
−
59
View file @
785332c9
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
#include
<corsika/framework/geometry/Point.hpp>
#include
<corsika/framework/geometry/QuantityVector.hpp>
#include
<corsika/framework/geometry/Sphere.hpp>
#include
<corsika/framework/geometry/Vector.hpp>
#include
<corsika/media/Environment.hpp>
#include
<limits>
#include
<stdexcept>
#include
<utility>
namespace
corsika
::
tracking_line
{
inline
std
::
optional
<
std
::
pair
<
TimeType
,
TimeType
>>
TimeOfIntersection
(
corsika
::
Line
const
&
line
,
corsika
::
Sphere
const
&
sphere
)
{
auto
const
delta
=
line
.
getStartPoint
()
-
sphere
.
getCenter
();
auto
const
v
=
line
.
getVelocity
();
auto
const
vSqNorm
=
v
.
getSquaredNorm
();
// todo: get rid of this by having V0 normalized always
auto
const
R
=
sphere
.
getRadius
();
auto
const
vDotDelta
=
v
.
dot
(
delta
);
auto
const
discriminant
=
vDotDelta
*
vDotDelta
-
vSqNorm
*
(
delta
.
getSquaredNorm
()
-
R
*
R
);
if
(
discriminant
.
magnitude
()
>
0
)
{
auto
const
sqDisc
=
sqrt
(
discriminant
);
auto
const
invDenom
=
1
/
vSqNorm
;
return
std
::
make_pair
((
-
vDotDelta
-
sqDisc
)
*
invDenom
,
(
-
vDotDelta
+
sqDisc
)
*
invDenom
);
}
else
{
return
{};
}
}
inline
TimeType
getTimeOfIntersection
(
Line
const
&
vLine
,
Plane
const
&
vPlane
)
{
auto
const
delta
=
vPlane
.
getCenter
()
-
vLine
.
getStartPoint
();
auto
const
v
=
vLine
.
getVelocity
();
auto
const
n
=
vPlane
.
getNormal
();
auto
const
c
=
n
.
dot
(
v
);
if
(
c
.
magnitude
()
==
0
)
{
return
std
::
numeric_limits
<
TimeType
::
value_type
>::
infinity
()
*
1
_s
;
}
else
{
return
n
.
dot
(
delta
)
/
c
;
}
}
}
// namespace corsika::tracking_line
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