public void Add(IRaycastGeometry <A> geometry, float4x4 transform) { instances.Add(new Visual { Geometry = geometry, Transform = transform, }); }
// Leaf Contructor public CSGNode(IRaycastGeometry <float3> geometry, float4x4?transform = null, float3?lowerBound = null, float3?upperBound = null) { Geometry = geometry; Transform = transform != null ? transform.Value : Transforms.Identity; LowerBound = lowerBound; UpperBound = upperBound; ApplyBounds(); }
public static IRaycastGeometry <T> AttributesMap <A, T>(this IRaycastGeometry <A> geometry, Func <A, T> transform) where T : struct where A : struct { return(new TransformedAttributes <T, A>(geometry, transform)); }
public TransformedAttributes(IRaycastGeometry <A> geometry, Func <A, T> transform) { this.transform = transform; this.geometry = geometry; }