本文整理汇总了C++中Assembly::AddComponent方法的典型用法代码示例。如果您正苦于以下问题:C++ Assembly::AddComponent方法的具体用法?C++ Assembly::AddComponent怎么用?C++ Assembly::AddComponent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Assembly
的用法示例。
在下文中一共展示了Assembly::AddComponent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Assembly
Assembly *GraspGLObjects::CreateRollPrompt( double radius ) {
Assembly *prompt = new Assembly();
// Angular extent of the circular arrow, where 1.0 = 360°.
double guage = radius / 10.0;
double arc = 0.85;
Annulus *donut = new Annulus( radius, guage, arc, curve_facets, curve_facets );
donut->SetAttitude( 0.0, 90.0, 0.0 );
prompt->AddComponent( donut );
TaperedAnnulus *tip = new TaperedAnnulus( radius, radius / 3.0, 1.0, 0.05, curve_facets );
tip->SetAttitude( 0.0, 90.0, 0.0 );
tip->SetOrientation( - arc * 360.0, 0.0, 0.0 );
prompt->AddComponent( tip );
Ellipsoid *base = new Ellipsoid ( guage, guage / 2.0, guage );
base->SetPosition( radius, 0.0, 0.0 );
prompt->AddComponent( base );
prompt->SetColor( 0.5, 0.5, 0.5, 0.5 );
return prompt;
}
示例2: MarkerStructureGLObject
MarkerStructureGLObject *GraspGLObjects::CreateHmdMarkerStructure ( char *model_file ) {
MarkerStructureGLObject *structure = new MarkerStructureGLObject( model_file );
Slab *bar;
Assembly *frame = new Assembly();
bar = new Slab( STRUCTURE_BAR_RADIUS, 100.0, STRUCTURE_BAR_RADIUS );
bar->SetPosition( 0.0, 0.0, 0.0 );
frame->AddComponent( bar );
bar = new Slab( 210.0, STRUCTURE_BAR_RADIUS, STRUCTURE_BAR_RADIUS );
bar->SetPosition( 0.0, 0.0, 0.0 );
frame->AddComponent( bar );
bar = new Slab( STRUCTURE_BAR_RADIUS, 160.0, STRUCTURE_BAR_RADIUS );
bar->SetPosition( 110.0, 0.0, 40.0 );
frame->AddComponent( bar );
bar = new Slab( STRUCTURE_BAR_RADIUS, 160.0, STRUCTURE_BAR_RADIUS );
bar->SetPosition( -110.0, 0.0, 40.0 );
frame->AddComponent( bar );
bar = new Slab( STRUCTURE_BAR_RADIUS, STRUCTURE_BAR_RADIUS, 40 );
bar->SetPosition( -110.0, 0.0, 20.0 );
frame->AddComponent( bar );
bar = new Slab( STRUCTURE_BAR_RADIUS, STRUCTURE_BAR_RADIUS, 40 );
bar->SetPosition( 110.0, 0.0, 20.0 );
frame->AddComponent( bar );
frame->SetPosition( 0.0, 0.0, -10.0 );
structure->AddComponent( frame );
structure->SetColor( Translucid( GRAY ) );
// structure->SetOrientation( 0.0, 0.0, 90.0 );
return( structure );
}