Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        CCloth cloth = new CCloth(rowNodeSize, columnNodeSize, 0, 1, 1, dt, lineSize, KS, KD);

        cRenderer.AddClothModel(cloth);
        Debug.Log(cRenderer.Cloth_Model_list[0].mNodeArray.Count);

        mesh = new Mesh();
        GetComponent <MeshFilter>().mesh       = mesh;
        GetComponent <MeshRenderer>().material = material;
        //meshRenderer = gameObject.AddComponent<MeshRenderer>();
    }
Example #2
0
 public void AddClothModel(CCloth model)
 {
     Cloth_Model_list.Add(model);
 }