Package org.orekit.frames
Class CachedTransformProvider
- java.lang.Object
-
- org.orekit.frames.CachedTransformProvider
-
public class CachedTransformProvider extends Object
Thread-safe cached provider for frame transforms.This provider is based on a thread-safe Least Recently Used cache using date as it access key, hence saving computation time on transform building.
This class is thread-safe.
- Since:
- 13.0.3
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description CachedTransformProvider(Frame origin, Frame destination, Function<AbsoluteDate,Transform> fullGenerator, Function<AbsoluteDate,KinematicTransform> kinematicGenerator, Function<AbsoluteDate,StaticTransform> staticGenerator, int cacheSize)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCacheSize()
Get the nmber of transforms kept in the date-based cache.Frame
getDestination()
Get destination frame.KinematicTransform
getKinematicTransform(AbsoluteDate date)
Get theTransform
corresponding to specified date.Frame
getOrigin()
Get origin frame.StaticTransform
getStaticTransform(AbsoluteDate date)
Get theTransform
corresponding to specified date.Transform
getTransform(AbsoluteDate date)
Get theTransform
corresponding to specified date.
-
-
-
Constructor Detail
-
CachedTransformProvider
public CachedTransformProvider(Frame origin, Frame destination, Function<AbsoluteDate,Transform> fullGenerator, Function<AbsoluteDate,KinematicTransform> kinematicGenerator, Function<AbsoluteDate,StaticTransform> staticGenerator, int cacheSize)
Simple constructor.- Parameters:
origin
- origin framedestination
- destination framefullGenerator
- generator for full transformskinematicGenerator
- generator for kinematic transformsstaticGenerator
- generator for static transformscacheSize
- number of transforms kept in the date-based cache
-
-
Method Detail
-
getOrigin
public Frame getOrigin()
Get origin frame.- Returns:
- origin frame
-
getDestination
public Frame getDestination()
Get destination frame.- Returns:
- destination frame
-
getCacheSize
public int getCacheSize()
Get the nmber of transforms kept in the date-based cache.- Returns:
- nmber of transforms kept in the date-based cache
-
getTransform
public Transform getTransform(AbsoluteDate date)
Get theTransform
corresponding to specified date.- Parameters:
date
- current date- Returns:
- transform at specified date
-
getKinematicTransform
public KinematicTransform getKinematicTransform(AbsoluteDate date)
Get theTransform
corresponding to specified date.- Parameters:
date
- current date- Returns:
- transform at specified date
-
getStaticTransform
public StaticTransform getStaticTransform(AbsoluteDate date)
Get theTransform
corresponding to specified date.- Parameters:
date
- current date- Returns:
- transform at specified date
-
-