/// <summary> /// Creates a GameObject with a list of triangles as its geometry, and a position to start at /// </summary> /// <param name="_tris">The list of tris to use</param> /// <param name="position">The position to place the gameobject at</param> public GameObject(List <Tri> _tris, Vector3 position) { model = new Model(_tris.ConvertAll(tri => new Tri(tri.p1, tri.p2, tri.p3))); transformation = new Transformation(this, position, new Vector3(1, 1, 1), Vector3.Zero); }
/// <summary> /// Creates a GameObject with a list of triangles as its geometry /// </summary> /// <param name="_tris">The list of tris to use</param> public GameObject(List <Tri> _tris) {//If the gameobject is instantiated with a list of tris, then just store them model = new Model(_tris.ConvertAll(tri => new Tri(tri.p1, tri.p2, tri.p3))); transformation = new Transformation(this); }