Cylinders.
Let's create an array of the cylinders lying on the same line but having different parameters:
for (int i=2;i<8;i++)
{
sgCCylinder* cy1 = sgCreateCylinder(i,2*i,24);
SG_VECTOR transV1 = {5*i,10,10};
cy1->InitTempMatrix()->Translate(transV1);
cy1->ApplyTempMatrix();
cy1->DestroyTempMatrix();
sgGetScene()->AttachObject(cy1);
cy1->SetAttribute(SG_OA_COLOR,i);
if (i%2)
cy1->SetAttribute(SG_OA_DRAW_STATE,SG_DS_FRAME);
}
See also:
sgCCylinder sgCCylinder::Create
sgCObject::InitTempMatrix sgCMatrix::Translate sgCObject::ApplyTempMatrix SgCObject::DestroyTempMatrix sgGetScene sgCScene::AttachObject sgCObject::SetAttribute
Illustration: