示例#1
0
        public fbs_Bounds GetBounds(fbs_Bounds obj)
        {
            int num = base.__offset(12);

            if (num == 0)
            {
                return(null);
            }
            return(obj.__init(base.__indirect(num + base.bb_pos), base.bb));
        }
        protected override void OnRebuildData()
        {
            fbs_Bounds fbsBounds = new fbs_Bounds();

            for (int i = 0, k = m_fbsObj.MasterListLength; i < k; ++i)
            {
                fbs_BVHNode node = m_fbsObj.GetMasterList(i);

                node.GetBounds(fbsBounds);
                Bounds bounds = new Bounds();

                fbs_vec3 center = fbsBounds.Center;
                fbs_vec3 size   = fbsBounds.Size;
                bounds.center = new Vector3(center.X, center.Y, center.Z);
                bounds.size   = new Vector3(size.X, size.Y, size.Z);
                m_boundsCache.Add(bounds);
            }
        }
示例#3
0
 public static fbs_Bounds GetRootAsfbs_Bounds(ByteBuffer _bb, fbs_Bounds obj)
 {
     return(obj.__init(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }