Exemplo n.º 1
0
        public Model3DGroup GetAirplaneModel()
        {
            ObjReader    CurrentHelixObjReader = new ObjReader();
            Model3DGroup MyModel = CurrentHelixObjReader.Read(GetExeDirectory() + "\\Resources\\Models\\plane.obj");

            Transform3DGroup group = new Transform3DGroup();

            group.Children.Add(new TranslateTransform3D(new Vector3D(0, 0, 0)));
            group.Children.Add(new ScaleTransform3D(new Vector3D(0.05, 0.05, 0.05)));
            group.Children.Add(new RotateTransform3D(new AxisAngleRotation3D(new Vector3D(0, 0, 1), 90)));
            MyModel.Transform = group;
            this.Name         = "RA" + this.GetHashCode().ToString();
            Label             = CreateBillboard(this.Name);
            MyModel.SetName(this.Name);
            return(MyModel);
        }
Exemplo n.º 2
0
        private BillboardTextGroupVisual3D CreateBillboard(string text)
        {
            BillboardTextGroupVisual3D billboard = new BillboardTextGroupVisual3D()
            {
                Background      = Brushes.White,
                BorderBrush     = Brushes.Black,
                Foreground      = Brushes.Black,
                BorderThickness = new System.Windows.Thickness(1),
                FontSize        = 11,
                Offset          = new System.Windows.Vector(30, 30),
                PinBrush        = Brushes.Gray,
                IsEnabled       = true
            };
            List <BillboardTextItem> TextItems3 = new List <BillboardTextItem>();

            TextItems3.Add(new BillboardTextItem {
                Text = text, Position = new Point3D(0.5, 0, 0.5), DepthOffset = 0, WorldDepthOffset = 0.2
            });

            billboard.Items = TextItems3;


            return(billboard);
        }