public class MotionTargetLaunchable
extends java.lang.Object
MotionTargetProjectile
is used as a preliminary end point of a
Launchable
's move. The reason for this is about collision.
in this momentary implementation the starting point of the movement is
also included in order to detach some collision routines from
the originating Launchable
, called inceptor
. A
linear projectile movement is assumed, that is why no starting orientation is
stored.
Modifier and Type | Field and Description |
---|---|
Vector |
endPos |
Launchable |
inceptor |
Angle |
orientation |
Vector |
startPos |
double |
targetTime |
Vector |
velocity |
Constructor and Description |
---|
MotionTargetLaunchable(Launchable inceptor,
Vector startPos,
Vector endPos,
Angle orientation,
Vector velocity,
double targetTime) |
Modifier and Type | Method and Description |
---|---|
double |
calculateCenterDistance(Vector point)
Determines the minimum distance to the given point throughout the frame.
|
void |
commitToProjectile() |
Vector |
getEndPos() |
public Vector endPos
public Launchable inceptor
public Angle orientation
public Vector startPos
public double targetTime
public Vector velocity
public MotionTargetLaunchable(Launchable inceptor, Vector startPos, Vector endPos, Angle orientation, Vector velocity, double targetTime)
inceptor
- pos
- orientation
- velocity
- targetTime
- As projectiles are destroyed on first hit, the
intra-collision-frame-start-time is always zero.public double calculateCenterDistance(Vector point)
point
- - [m]; global axespublic void commitToProjectile()
public Vector getEndPos()