pub struct EvalCtx<'a> {
pub scope_size: Vec3,
pub split_i: f64,
pub split_n: f64,
pub depth: f64,
pub params: &'a [(String, f64)],
pub globals: &'a HashMap<String, f64>,
pub rng: &'a mut Pcg64,
}Expand description
Per-shape evaluation context.
Built by the interpreter for each work item; params are the innermost
rule-call arguments (linear scan, shadowing globals), globals the
merged attribute/constant table (style and host overrides already applied).
Fields§
§scope_size: Vec3Current scope extents (scope.x / scope.y / scope.z).
split_i: f64Zero-based index within the last split/repeat; 0.0 at the root.
split_n: f64Sibling count of the last split/repeat; 1.0 at the root.
depth: f64Derivation depth of the current rule invocation.
params: &'a [(String, f64)]Innermost rule-call parameter bindings; searched in reverse so the latest binding of a repeated name wins.
globals: &'a HashMap<String, f64>Grammar attributes + constants (merged, overrides applied).
rng: &'a mut Pcg64Per-shape RNG stream (rand(..) draws).
Auto Trait Implementations§
impl<'a> !UnwindSafe for EvalCtx<'a>
impl<'a> Freeze for EvalCtx<'a>
impl<'a> RefUnwindSafe for EvalCtx<'a>
impl<'a> Send for EvalCtx<'a>
impl<'a> Sync for EvalCtx<'a>
impl<'a> Unpin for EvalCtx<'a>
impl<'a> UnsafeUnpin for EvalCtx<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more