Ejemplo n.º 1
0
 public void CopyTo(MInstanceModel mo)
 {
     mo.material       = material;
     mo.tree           = tree;
     mo.mesh           = mesh;
     mo.TotalInstances = TotalInstances;
     mo.instanceVBO    = instanceVBO;
     mo.mats           = mats;
 }
Ejemplo n.º 2
0
        public static MInstanceModel SpawnInstanced(MObject parent, string TemplateID, string OwnerID, string sName, Vector3d pos)
        {
            MInstanceModel mo = (MInstanceModel)MScene.TemplateRoot.FindModuleByInstanceID(TemplateID);

            MInstanceModel m = new MInstanceModel(sName, mo.ModelPath, mo.MeshTexture);

            m.OwnerID            = OwnerID;
            m.transform.Position = pos;
            mo.CopyTo(m);
            parent.Add(m);

            return(m);
        }