#[non_exhaustive]pub enum Sampled<'a> {
No,
Unset,
Yes {
samples: Vec<(f64, &'a OwnedArgument)>,
last_defined: &'a OwnedArgument,
},
}Expand description
What ɴsɪ’s typing rule makes of one attribute’s samples.
Returned by Scene::sampled_attribute, and what the resolver
itself reads for transformationmatrix and the instancer’s
attributes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
No
Not sampled. The static value applies and Node::effective
gives it – run the same predicate over that too: the rule
is about the call, not about SetAttributeAtTime. Rendered, a
static "nvertices" "int64" 1 is E6007, then E6020, and
the mesh does not draw.
Unset
Sampled, but the last call cannot be read as the attribute’s type – so the attribute is unset, at every time.
This is not “no samples”: 3Delight rejects the argument at the
call and the attribute has no value at all afterwards.
Rendered on a mesh’s P – good at t=0, a float at t=1 –
it logs E6007 and then E6020, and draws nothing. A
backend that fell back to the earlier sample here would draw a
mesh the renderer does not.
Yes
The surviving samples.
Never empty: keep_from is one past the last unreadable
definition and equals the count only in the Unset case, so at
least one survivor is always left. Three call sites carried an
is_empty branch for a case that cannot arise; they are gone.
The name is resolved here rather than at every consumer, which is what lets the survivors be an arbitrary subset of the timeline.
Fields
samples: Vec<(f64, &'a OwnedArgument)>In time order, which is what interpolation needs.
last_defined: &'a OwnedArgumentThe survivor defined last, which is what an attribute that is not motion data takes for the whole shutter – and is not the sample at the greatest time for a scene whose samples did not arrive in time order.