Exemplo n.º 1
0
        public virtual float event_getBoundingRadius()
        {
            float          ret = 0.0f;
            AxisAlignedBox box = this.CallBase_getBoundingBox();

            ret = (float)Math.Sqrt(
                Math.Max((double)box.GetMaximum().LengthSquared, (double)box.GetMinimum().LengthSquared)
                );

            return(ret);
        }
Exemplo n.º 2
0
        public virtual float event_getSquaredViewDepth(Camera cam)
        {
            Vector3        min, max, mid, dist;
            AxisAlignedBox box = this.CallBase_getBoundingBox();

            min  = box.GetMinimum();
            max  = box.GetMaximum();
            mid  = ((max - min) * 0.5f) + min;
            dist = cam.GetDerivedPosition() - mid;

            return(dist.LengthSquared);
        }
Exemplo n.º 3
0
        public virtual float event_getSquaredViewDepth(Camera cam)
        {
            float          ret = 0.0f;
            Vector3        vMin, vMax, vMid, vDist;
            AxisAlignedBox box = this.CallBase_getBoundingBox();

            vMin  = box.GetMinimum();
            vMax  = box.GetMaximum();
            vMid  = ((vMin - vMax) * 0.5f) + vMin;
            vDist = cam.GetDerivedPosition() - vMid;

            ret = vDist.LengthSquared;

            return(ret);
        }