Spherical bands.

 

Let's create three spherical bands with different radii of the ruling spheres but with the same clipping coefficient:

 

 for (int i=2;i<5;i++)

 {

   sgCSphericBand* sb1 = sgCreateSphericBand(i,-0.4, 0.5, 24);

   SG_VECTOR transV1 = {5*i,10,10};

   sb1->InitTempMatrix()->Translate(transV1);

   sb1->ApplyTempMatrix();

   sb1->DestroyTempMatrix();

 

   sgGetScene()->AttachObject(sb1);

   sb1->SetAttribute(SG_OA_COLOR,i);

 }

 

 

See also:

 

sgCSphericBand   sgCSphericBand::Create

sgCObject::InitTempMatrix sgCMatrix::Translate   sgCObject::ApplyTempMatrix   SgCObject::DestroyTempMatrix   sgGetScene sgCScene::AttachObject   sgCObject::SetAttribute

 

Illustration:

spB