当前位置: 首页>>代码示例>>C++>>正文


C++ Disk::SetColor方法代码示例

本文整理汇总了C++中Disk::SetColor方法的典型用法代码示例。如果您正苦于以下问题:C++ Disk::SetColor方法的具体用法?C++ Disk::SetColor怎么用?C++ Disk::SetColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Disk的用法示例。


在下文中一共展示了Disk::SetColor方法的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;

}
开发者ID:PsyPhy,项目名称:GRASPonISS,代码行数:13,代码来源:GraspGLObjects.cpp

示例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 );

}
开发者ID:frenchjam,项目名称:DexSourceCode,代码行数:44,代码来源:AfdObjects.cpp


注:本文中的Disk::SetColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。