예제 #1
0
 public void Add(IRaycastGeometry <A> geometry, float4x4 transform)
 {
     instances.Add(new Visual
     {
         Geometry  = geometry,
         Transform = transform,
     });
 }
예제 #2
0
 // 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();
 }
예제 #3
0
 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));
 }
예제 #4
0
 public TransformedAttributes(IRaycastGeometry <A> geometry, Func <A, T> transform)
 {
     this.transform = transform;
     this.geometry  = geometry;
 }