Gravity Engine 12.0
Unity Asset for Gravity
Loading...
Searching...
No Matches
TrajectoryData Class Reference

Trajectory data. Class to hold points in a trajectory in "sorted" order. Each point contains a position, velocity and time. More...

Inheritance diagram for TrajectoryData:

Classes

class  Intercept
 Container class to hold the points on two trajectories at an intercept point. More...
 
class  InterceptComparer
 
class  Tpoint
 
class  TpointCompare
 

Public Member Functions

IEnumerator GetEnumerator ()
 
void AddPoint (Vector3 r, Vector3 v, float t)
 
int TrimEarlier (double cutoffTime, double buffer)
 
int Count ()
 
void MoveAll (Vector3 moveBy)
 
List< TpointAsSortedList ()
 
List< InterceptGetIntercepts (TrajectoryData tdata, float deltaDistance, float deltaTime)
 Compare this trajectory data set to another and find those points that are within the specified deltaDistance. DeltaDistance denotes the seperation in EACH co-ordinate (i.e. they are within in a BOX of size delta distance) to reduce CPU cost of calculating exact distance.)
 

Detailed Description

Trajectory data. Class to hold points in a trajectory in "sorted" order. Each point contains a position, velocity and time.

Insertion maintains order. This facilitates determining if two trajectory paths get close enough to be considered as "crossing".

Member Function Documentation

◆ GetIntercepts()

List< Intercept > TrajectoryData.GetIntercepts ( TrajectoryData  tdata,
float  deltaDistance,
float  deltaTime 
)

Compare this trajectory data set to another and find those points that are within the specified deltaDistance. DeltaDistance denotes the seperation in EACH co-ordinate (i.e. they are within in a BOX of size delta distance) to reduce CPU cost of calculating exact distance.)

DeltaTime specifies the time within which multiple intercept points should be regarded as duplicates (in which case the intercept with the closest approach is used)

List of intercepts is provided in time order (earliest first)

Parameters
tdata
deltaDistance
deltaTime
Returns

The documentation for this class was generated from the following file: