Model.AddSubset

int AddSubset(Mesh mesh, Material material, Matrix& transform)

Adds a new subset to the Model, and recalculates the bounds. A default subset name of “subsetX” will be used, where X is the subset’s index.

   
Mesh mesh The Mesh for the subset, may not be null.
Material material The Material for the subset, may not be null.
Matrix& transform A transform Matrix representing the Mesh’s location relative to the origin of the Model.
RETURNS: int The index of the subset that was just added.
int AddSubset(string name, Mesh mesh, Material material, Matrix& transform)

Adds a new subset to the Model, and recalculates the bounds.

   
string name The text name of the subset. If this is null, then a default name of “subsetX” will be used, where X is the subset’s index.
Mesh mesh The Mesh for the subset, may not be null.
Material material The Material for the subset, may not be null.
Matrix& transform A transform Matrix representing the Mesh’s location relative to the origin of the Model.
RETURNS: int The index of the subset that was just added.

Examples

model.AddSubset(
	Mesh   .GenerateSphere(1),
	Default.Material,
	Matrix .T(0,1,0));




Found an issue with these docs, or have some additional questions? Create an Issue on Github!