Struct nyx_space::md::ui::Event [−][src]
pub struct Event {
pub parameter: StateParameter,
pub desired_value: f64,
pub epoch_precision: TimeUnit,
pub value_precision: f64,
pub in_frame: Option<(Frame, Arc<Cosm>)>,
}Expand description
Defines a state parameter event finder
Fields
parameter: StateParameterThe state parameter
desired_value: f64The desired self.desired_value, must be in the same units as the state parameter
epoch_precision: TimeUnitThe time precision after which the solver will report that it cannot find any more precise
value_precision: f64The precision on the desired value
in_frame: Option<(Frame, Arc<Cosm>)>An optional frame in which to search this – it IS recommended to convert the whole trajectory instead of searching in a given frame!
Implementations
Match a specific event for the parameter to hit the specified value. By default, the time precision is 1 millisecond and the value precision is 1e-3 of whatever unit is the default for that parameter. For example, a radius event will seek the requested value at the meter level, and an angle event will seek it at the thousands of a degree.
pub fn within_tolerance(
parameter: StateParameter,
desired_value: f64,
value_precision: f64
) -> Self
pub fn within_tolerance(
parameter: StateParameter,
desired_value: f64,
value_precision: f64
) -> Self
Match a specific event for the parameter to hit the specified value with the provided tolerance on the value
Match a specific event for the parameter to hit the specified value with the provided tolerance on the value and time
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Event
impl !UnwindSafe for Event
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self is actually part of its subset T (and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self to the equivalent element of its superset.