Expand description
Data structures for shape evaluation
Types in this module are typically thin (generic) wrappers around objects
that implement traits in fidget_core::eval. The wrapper types
are specialized to operate on x, y, z arguments, rather than taking
arbitrary numbers of variables.
For example, a Shape is a wrapper which makes it easier to treat a
Function as an implicit surface (with X, Y, Z axes and functions that
accept a transform matrix).
use fidget_core::vm::VmShape;
use fidget_core::context::Context;
use fidget_core::shape::EzShape;
let mut ctx = Context::new();
let x = ctx.x();
let shape = VmShape::new(&ctx, x)?;
// Let's build a single point evaluator:
let mut eval = VmShape::new_point_eval();
let tape = shape.ez_point_tape();
let (value, _trace) = eval.eval_with_transform(
&tape, 0.25, 0.0, 0.0, &nalgebra::Matrix4::identity()
)?;
assert_eq!(value, 0.25);Structs§
- Bound
Shape - Shape with bound variables
- Missing
Var - A
VarIndexvariable is missing - Shape
- A shape represents an implicit surface with X/Y/Z variables
- Shape
Bulk Eval - Wrapper around a
BulkEvaluator - Shape
Tape - Wrapper around a single-output function tape
- Shape
Tracing Eval - Wrapper around a
TracingEvaluator - Shape
Vars - Variables bound to values for shape evaluation
Enums§
- Shape
Bulk Eval Error - Error type for shape bulk evaluation
- Shape
Tracing Eval Error - Error type for shape tracing evaluation
Traits§
- EzShape
- Extension trait for working with a shape without thinking much about memory
- Transformable
- Trait for types that can be transformed by a 4x4 homogeneous transform matrix