Exemple #1
0
        public BSTriShape(NiTriBasedGeom shape)
        {
            this.name            = shape.GetName();
            this.nameIdx         = shape.GetNameIndex();
            this.numExtraData    = shape.GetNumExtraData();
            this.extraData       = shape.GetExtraData();
            this.controller      = shape.GetController();
            this.flags           = shape.GetFlags();
            this.flags2          = shape.GetFlags2();
            this.translation     = shape.GetTranslation();
            this.rotation        = shape.GetRotation();
            this.scale           = shape.GetScale();
            this.collisionObject = shape.GetCollisionObject();

            this.center = new Vector3(0, 0, 0);
            this.radius = 0;

            this.skinInstance = shape.GetSkinInstance();
            this.bsProperties = new int[2];
            for (int index = 0; index < 2; ++index)
            {
                this.bsProperties[index] = shape.GetBSProperty(index);
            }

            this.vertexSize   = 8;
            this.floatSize    = 4;
            this.vertexFlag3  = 101;
            this.vertexFlag4  = 7;
            this.vertexFlag5  = 0;
            this.vertexFlags  = 0;
            this.vertexFlag8  = 0;
            this.numTriangles = 0;
            this.numVertices  = 0;
            this.dataSize     = 0;
            this.vertexData   = new List <BSVertexData>();
            this.triangles    = new List <Triangle>();
            this.vertices     = new List <Vector3>();
            this.normals      = new List <Vector3>();
            this.tangents     = new List <Vector3>();
            this.bitangents   = new List <Vector3>();
            this.vertexColors = new List <Color4>();
            this.uvCoords     = new List <UVCoord>();
            particleDataSize  = 0;
        }