本文整理汇总了C#中Octree.Union方法的典型用法代码示例。如果您正苦于以下问题:C# Octree.Union方法的具体用法?C# Octree.Union怎么用?C# Octree.Union使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Octree
的用法示例。
在下文中一共展示了Octree.Union方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Window
public Window()
: base(1280, 720, new GraphicsMode(32, 0, 0, 4), "OpenCAD")
{
stl = new STL("Models/elephant.stl", Color.Green, STLType.Binary);
var s1 = new Sphere {Center = Vect3.Zero, Radius = 4};
var s2 = new Sphere {Center = new Vect3(0,5,0), Radius = 4};
var t1 = new Octree<Voxel>(Vect3.Zero, 32.0);
var t2 = new Octree<Voxel>(Vect3.Zero, 32.0);
Test2(t1, node => s1.Intersects(node.AABB));
Test(t2, stl.Elements);
_tree = t1.Union(t2);
//_tree.Test(node => sphere.Intersects(node.AABB),maxLevel);
//Test2(t, node => sphere.Intersects(node.AABB));
//t[0].Clear();
//t[0].Clear();
//Test(_tree,stl.Elements);
//create from stl
//foreach (var tri in stl.Elements)
//{
// Intersect(_tree, tri);
//}
VSync = VSyncMode.On;
_camera = new Camera();
Mouse.WheelChanged += (sender, args) =>
{
_camera.View = _camera.View * Mat4.Translate(0, 0, args.DeltaPrecise * -10.0);
//_camera.Eye += new Vect3(0, 0, args.DeltaPrecise * -10.0);
// Console.WriteLine(_camera.Eye);
};
}