Пример #1
0
        public BgPoly(BgMesh mesh, Ptr ptr)
        {
            ReadPoly(ptr);

            Id      = (ptr - mesh.PolyArray) / 0x10;
            Type    = BgPolyType.GetPolyType(mesh, typeId);
            VertexA = BgVertex.GetVertex(mesh, vtxIdA);
            VertexB = BgVertex.GetVertex(mesh, vtxIdB);
            VertexC = BgVertex.GetVertex(mesh, vtxIdC);
        }
Пример #2
0
        public BgPoly(BgMesh mesh, int id)
        {
            Ptr ptr = mesh.PolyArray.Deref(0x10 * id);

            ReadPoly(ptr);
            Id      = id;
            Type    = BgPolyType.GetPolyType(mesh, typeId);
            VertexA = BgVertex.GetVertex(mesh, vtxIdA);
            VertexB = BgVertex.GetVertex(mesh, vtxIdB);
            VertexC = BgVertex.GetVertex(mesh, vtxIdC);
        }
Пример #3
0
        public BgPoly(DynaCollisionContext dyna, BgActor bgActor, Ptr ptr)
        {
            BgMesh mesh = new(bgActor.MeshPtr);

            ReadPoly(ptr);

            Id      = (ptr - dyna.polyList) / 0x10 - bgActor.dynaLookup.polyStartIndex;
            Type    = BgPolyType.GetPolyType(mesh, typeId);
            VertexA = BgVertex.GetVertex(dyna, bgActor, vtxIdA);
            VertexB = BgVertex.GetVertex(dyna, bgActor, vtxIdB);
            VertexC = BgVertex.GetVertex(dyna, bgActor, vtxIdC);
        }