Barotrauma Client Doc
Barotrauma.CachedDistance Class Reference

Public Member Functions

 CachedDistance (Vector2 startWorldPos, Vector2 endWorldPos, float dist, double recalculationTime)
 
bool ShouldUpdateDistance (Vector2 currentStartWorldPos, Vector2 currentEndWorldPos, float minDistanceToUpdate=500.0f)
 

Public Attributes

readonly Vector2 StartWorldPos
 
readonly Vector2 EndWorldPos
 
readonly float Distance
 
double RecalculationTime
 

Detailed Description

Definition at line 5 of file CachedDistance.cs.

Constructor & Destructor Documentation

◆ CachedDistance()

Barotrauma.CachedDistance.CachedDistance ( Vector2  startWorldPos,
Vector2  endWorldPos,
float  dist,
double  recalculationTime 
)

Definition at line 12 of file CachedDistance.cs.

Member Function Documentation

◆ ShouldUpdateDistance()

bool Barotrauma.CachedDistance.ShouldUpdateDistance ( Vector2  currentStartWorldPos,
Vector2  currentEndWorldPos,
float  minDistanceToUpdate = 500.0f 
)

Definition at line 20 of file CachedDistance.cs.

Member Data Documentation

◆ Distance

readonly float Barotrauma.CachedDistance.Distance

Definition at line 9 of file CachedDistance.cs.

◆ EndWorldPos

readonly Vector2 Barotrauma.CachedDistance.EndWorldPos

Definition at line 8 of file CachedDistance.cs.

◆ RecalculationTime

double Barotrauma.CachedDistance.RecalculationTime

Definition at line 10 of file CachedDistance.cs.

◆ StartWorldPos

readonly Vector2 Barotrauma.CachedDistance.StartWorldPos

Definition at line 7 of file CachedDistance.cs.