示例#1
0
 public void Dispose(SoNode node, object domainObj, Window3DRendererContext context)
 {
     if (node.IsDisposable)
     {
         node.Dispose();
     }
 }
示例#2
0
        public SoNode Create(object domainObj, Window3DRendererContext context)
        {
            var xyzObject = domainObj as XYZObject;
            var soXyzNode = new SoXYZNode(xyzObject, context.Window);

            return(soXyzNode);
        }
示例#3
0
        public void GetPickInfo(object domainObject, Window3DPickedPoint point, Window3DRendererContext context)
        {
            var xyzObject = domainObject as XYZObject;

            //
            if (xyzObject == null)
            {
                return;
            }
            //
            var sphereCenter = new Point3(xyzObject.X, xyzObject.Y, xyzObject.Z);
            var pickedPoint  = new Point3(point.Ray.Origin.X, point.Ray.Origin.Y, point.Ray.Origin.Z);
            //
            Segment3 fromPickedPointToCircleCenter = new Segment3(sphereCenter, pickedPoint);

            //
            // if the segment length is smaller than the radius then we assume that the object is selected
            if (fromPickedPointToCircleCenter.Length <= xyzObject.Radius)
            {
                point.PickString = new[] { "Picked XYZ" };
                point.World      = point.WorldHit;
            }
        }
示例#4
0
 public void Update(SoNode node, object domainObj, Window3DRendererContext context)
 {
 }
示例#5
0
 public bool CanCreate(object domainObj, Window3DRendererContext context)
 {
     return(domainObj is XYZObject &&
            Equals(context.Window.Domain, Domain.ELEVATION_DEPTH));
 }