Beispiel #1
0
        public List <GREntity3D> rayCastAll(Vec3 vec)
        {
            List <GREntity3D>     list  = new List <GREntity3D>();
            List <IGraphObject3D> list2 = this.m_cam.rayCastAll(vec);

            foreach (IGraphObject3D current in list2)
            {
                bool flag = current.helper.ContainsKey("$graphObj");
                if (flag)
                {
                    GREntity3D gREntity3D = current.helper["$graphObj"] as GREntity3D;
                    gREntity3D.dispathEvent(Define.EventType.RAYCASTED, null);
                    list.Add(gREntity3D);
                }
            }
            return(list);
        }
Beispiel #2
0
        public GREntity3D rayCast(Vec3 vec)
        {
            IGraphObject3D graphObject3D = this.m_cam.rayCast(vec);
            bool           flag          = graphObject3D != null && graphObject3D.helper.ContainsKey("$graphObj");
            GREntity3D     result;

            if (flag)
            {
                GREntity3D gREntity3D = graphObject3D.helper["$graphObj"] as GREntity3D;
                gREntity3D.dispathEvent(Define.EventType.RAYCASTED, null);
                result = gREntity3D;
            }
            else
            {
                result = null;
            }
            return(result);
        }