Exemple #1
0
 public NiTriShape(NiTriBasedGeom shape)
 {
     this.name              = "";
     this.nameIdx           = -1;
     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.data              = shape.GetData();
     this.skinInstance      = shape.GetSkinInstance();
     this.numMaterials      = shape.GetNumMaterials();
     this.materialNames     = shape.GetMaterialNames();
     this.materialExtraData = shape.GetMaterialExtraData();
     this.activeMaterial    = shape.GetActiveMaterial();
     this.dirtyFlag         = shape.GetDirtyFlag();
     this.numProperties     = shape.GetNumProperties();
     this.properties        = new List <int>();
     for (int index = 0; (long)index < (long)this.numProperties; ++index)
     {
         this.properties.Add(shape.GetProperty(index));
     }
     this.bsProperties = new int[2];
     for (int index = 0; index < 2; ++index)
     {
         this.bsProperties[index] = shape.GetBSProperty(index);
     }
 }
 public NiTriShape(NiTriBasedGeom shape)
 {
     this.name = "";
     this.nameIdx = -1;
     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.data = shape.GetData();
     this.skinInstance = shape.GetSkinInstance();
     this.numMaterials = shape.GetNumMaterials();
     this.materialNames = shape.GetMaterialNames();
     this.materialExtraData = shape.GetMaterialExtraData();
     this.activeMaterial = shape.GetActiveMaterial();
     this.dirtyFlag = shape.GetDirtyFlag();
     this.numProperties = shape.GetNumProperties();
     this.properties = new List<int>();
     for (int index = 0; (long)index < (long)this.numProperties; ++index)
         this.properties.Add(shape.GetProperty(index));
     this.bsProperties = new int[2];
     for (int index = 0; index < 2; ++index)
         this.bsProperties[index] = shape.GetBSProperty(index);
 }
Exemple #3
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;
        }