コード例 #1
0
ファイル: myLine3D.cs プロジェクト: 0000duck/ogredotnet
        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);
        }
コード例 #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);
        }
コード例 #3
0
ファイル: myLine3D.cs プロジェクト: 0000duck/ogredotnet
        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);
        }