Пример #1
0
        public void TestImage()
        {
            if (ImageViewer.SelectedImageBox == null)
            {
                return;
            }

            try
            {
                var sphere = new EllipsoidPrimitive {
                    FrontTopLeft = new Vector3D(85, 85, 85), BackBottomRight = new Vector3D(115, 115, 115), Color = Color.Yellow
                };

                var image = new VtkTestPresentationImage();
                image.OverlayGraphics3D.Add(sphere);

                var dset = new DisplaySet {
                    Description = "blah", Name = "blah", Uid = Guid.NewGuid().ToString()
                };
                dset.PresentationImages.Add(image);

                ImageViewer.SelectedImageBox.DisplaySet = dset;
                ImageViewer.SelectedImageBox.Draw();
            }
            catch (Exception ex)
            {
                ExceptionHandler.Report(ex, Context.DesktopWindow);
            }
        }
Пример #2
0
        // Token: 0x06004216 RID: 16918 RVA: 0x0014FF48 File Offset: 0x0014E348
        public override void GenerateColliderGeometry()
        {
            Mesh colliderMesh = base.GetColliderMesh();

            if (colliderMesh)
            {
                colliderMesh.Clear();
                EllipsoidPrimitive.GenerateGeometry(colliderMesh, this.width, this.height, this.length, this.segments, this.normalsType, this.pivotPosition);
                base.RefreshMeshCollider();
            }
            base.GenerateColliderGeometry();
        }
Пример #3
0
        // Token: 0x06004214 RID: 16916 RVA: 0x0014FE94 File Offset: 0x0014E294
        public void GenerateGeometry(float width, float height, float length, int segments, NormalsType normalsType, PivotPosition pivotPosition)
        {
            MeshFilter component = base.GetComponent <MeshFilter>();

            if (component.sharedMesh == null)
            {
                component.sharedMesh = new Mesh();
            }
            Mesh sharedMesh = component.sharedMesh;

            base.GenerationTimeMS = EllipsoidPrimitive.GenerateGeometry(sharedMesh, width, height, length, segments, normalsType, pivotPosition);
            this.width            = width;
            this.height           = height;
            this.length           = length;
            this.segments         = segments;
            this.normalsType      = normalsType;
            this.flipNormals      = false;
            this.pivotPosition    = pivotPosition;
        }