本文整理汇总了C++中Disk::SetPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ Disk::SetPosition方法的具体用法?C++ Disk::SetPosition怎么用?C++ Disk::SetPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Disk
的用法示例。
在下文中一共展示了Disk::SetPosition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Assembly
Assembly *GraspGLObjects::CreateTorso( void ) {
Assembly *torso = new Assembly();
Slab *slab = new Slab( torso_shape[X], torso_shape[Y], torso_shape[Z] );
slab->SetColor( 0.1f, 0.4f, 0.0f );
torso->AddComponent( slab );
Disk *disk = new Disk( 50.0 );
disk->SetPosition( 0.0, 0.0, -40.0 );
disk->SetColor( 1.0f, 0.7f, 0.0f );
torso->AddComponent( disk );
return torso;
}
示例2: Cylinder
MeterStick::MeterStick( void ) {
double stick_radius = 25.0;
Cylinder *cylinder;
Disk *disk;
cylinder = new Cylinder( stick_radius, stick_radius, 200.0 );
cylinder->SetColor( RED );
AddComponent( cylinder );
cylinder = new Cylinder( stick_radius, stick_radius, 200.0 );
cylinder->SetOffset( 0.0, 0.0, 200.0 );
cylinder->SetColor( WHITE );
AddComponent( cylinder );
cylinder = new Cylinder( stick_radius, stick_radius, 200.0 );
cylinder->SetOffset( 0.0, 0.0, 400.0 );
cylinder->SetColor( RED );
AddComponent( cylinder );
cylinder = new Cylinder( stick_radius, stick_radius, 200.0 );
cylinder->SetOffset( 0.0, 0.0, 600.0 );
cylinder->SetColor( WHITE );
AddComponent( cylinder );
cylinder = new Cylinder( stick_radius, stick_radius, 200.0 );
cylinder->SetOffset( 0.0, 0.0, 800.0 );
cylinder->SetColor( RED );
AddComponent( cylinder );
cylinder = new Cylinder( stick_radius / 2.0, stick_radius / 2.0, 100.0 );
cylinder->SetAttitude( 90.0, j_vector );
cylinder->SetColor( BLACK );
AddComponent( cylinder );
cylinder = new Cylinder( stick_radius / 2.0, stick_radius / 2.0, 100.0 );
cylinder->SetAttitude( 90.0, j_vector );
cylinder->SetPosition( 0.0, 0.0, 1000.0 - stick_radius );
cylinder->SetColor( BLACK );
AddComponent( cylinder );
disk = new Disk( stick_radius );
disk->SetPosition( 0.0, 0.0, 990.0 );
disk->SetColor( RED );
AddComponent( disk );
}