static sgCGroup*   sgCGroup::CreateGroup(sgCObject** objcts, int cnt)

 

Description:

Creates a group of objects from the array.

 

Arguments:

objcts - array of pointers to the objects.

cnt - the number of objects in this array.

 

Returned value:

Returns the pointer to the created group. If the function fails returns NULL.

 

Example:

 

sgCObject*   objcts[4];

objcts[0] = sgCreateLine(0.0, 0.0, 0.0, 2.0, 3.0, 5.0);

objcts[1] = sgCreateLine(2.0, 3.0, 5.0, 10.0, 0.0, 3.0);

objcts[2] = sgCreateLine(10.0, 0.0, 3.0, 6.0, 13.0, 15.0);

objcts[0] = sgCGroup::CreateGroup(&objcts[0],3);

objcts[1] = sgCreateBox(6.0, 13.0, 15.0);

objcts[2] = sgCreateSphere(20.0, 24, 24);

objcts[3] = sgCreateLine(10.0, 6.0, -3.0, 0.0, 0.0, 0.0);

sgCGroup* resGroup = sgCGroup::CreateGroup(&objcts[0],4);

 

 

See also:

GetChildrenList   BreakGroup