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


C++ TGeoManager::MakeTrd2方法代码示例

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


在下文中一共展示了TGeoManager::MakeTrd2方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: robot


//.........这里部分代码省略.........
  top->AddNodeOverlap(Ear, 1, new TGeoCombiTrans(2, -16.5, 80, new TGeoRotation("R2", 0, -90, 0)));
  top->AddNodeOverlap(Ear, 1, new TGeoCombiTrans(2, 16.5, 80, new TGeoRotation("R2", 0, 90, 0)));
  top->AddNodeOverlap(Ear_2, 1, new TGeoCombiTrans(2, -20, 80, new TGeoRotation("R2", 0, -90, 0)));
  top->AddNodeOverlap(Ear_2, 1, new TGeoCombiTrans(2, 20, 80, new TGeoRotation("R2", 0, 90, 0)));

  for (int i = 1; i < 28; i += 1) {
    float a          = i * 0.2;
    TGeoVolume *Hear = Robot->MakeCons("Hear", Iron, 3, 13 + a, 16 + a, 13 + a, 16 + a, -60 - a, 60 + a);
    if (i < 27) {
      Hear->SetLineColor(12);
      Hear->SetFillColor(12);
    } else {
      Hear->SetLineColor(2);
      Hear->SetFillColor(2);
    }
    top->AddNodeOverlap(Hear, 1, new TGeoTranslation(0, 0, 89 - i));
  }
  for (int i = 1; i < 28; i += 1) {
    float a          = i * 0.2;
    TGeoVolume *Hear = Robot->MakeCons("Hear", Iron, 3, 13 + a, 16 + a, 13 + a, 16 + a, -70 - a, -60 - a);
    Hear->SetLineColor(2);
    Hear->SetFillColor(2);
    top->AddNodeOverlap(Hear, 1, new TGeoTranslation(0, 0, 89 - i));
  }
  for (int i = 1; i < 28; i += 1) {
    float a          = i * 0.2;
    TGeoVolume *Hear = Robot->MakeCons("Hear", Iron, 3, 13 + a, 16 + a, 13 + a, 16 + a, 60 + a, 70 + a);
    Hear->SetLineColor(2);
    Hear->SetFillColor(2);
    top->AddNodeOverlap(Hear, 1, new TGeoTranslation(0, 0, 89 - i));
  }

  // neck
  TGeoVolume *Mock = Robot->MakeTrd2("Mock", Iron, 1, 1, 7, 6.5, 20);
  Mock->SetLineColor(17);
  Mock->SetFillColor(17);
  TGeoVolume *Mock_1 = Robot->MakeTrd2("Mock_1", Iron, 1, 1, 6, 5, 20);
  Mock_1->SetLineColor(17);
  Mock_1->SetFillColor(17);
  TGeoVolume *Mock_s = Robot->MakeTrd2("Mock_s", Iron, 1, 1, 5, 4.5, 20);
  Mock_s->SetLineColor(17);
  Mock_s->SetFillColor(17);

  // drawing neck
  top->AddNodeOverlap(Mock, 1, new TGeoCombiTrans(-5, 4.7, 50, new TGeoRotation("R2", -30, 0, -10)));
  top->AddNodeOverlap(Mock, 1, new TGeoCombiTrans(-5, -4.7, 50, new TGeoRotation("R2", 30, 0, 10)));
  top->AddNodeOverlap(Mock_1, 1, new TGeoCombiTrans(11, -4, 50, new TGeoRotation("R2", 130, -8, 10)));
  top->AddNodeOverlap(Mock_1, 1, new TGeoCombiTrans(11, 4, 50, new TGeoRotation("R2", -130, 8, -10)));
  top->AddNodeOverlap(Mock_s, 1, new TGeoCombiTrans(2.5, 9, 50, new TGeoRotation("R2", 90, 0, 0)));
  top->AddNodeOverlap(Mock_s, 1, new TGeoCombiTrans(2.5, -9, 50, new TGeoRotation("R2", 90, 0, 0)));

  // chest
  TGeoVolume *Gasem = Robot->MakeBox("Gasem", Iron, 16, 50, 20);
  Gasem->SetLineColor(12);
  Gasem->SetFillColor(12);
  TGeoVolume *Gasem_b1 = Robot->MakeSphere("Gasem_b1", Iron, 0, 15, 0, 180, 0, 360);
  Gasem_b1->SetLineColor(12);
  Gasem_b1->SetFillColor(12);
  TGeoVolume *Gasem_b2 = Robot->MakeSphere("Gasem_b2", Iron, 0, 13, 0, 180, 0, 360);
  Gasem_b2->SetLineColor(12);
  Gasem_b2->SetFillColor(12);
  TGeoVolume *Gasem_1 = Robot->MakeEltu("Gasem_1", Iron, 13, 13, 20);
  Gasem_1->SetLineColor(12);
  Gasem_1->SetFillColor(12);
  TGeoVolume *Gasem_2 = Robot->MakeEltu("Gasem_2", Iron, 13, 13, 19);
  Gasem_2->SetLineColor(12);
开发者ID:amadio,项目名称:geant,代码行数:67,代码来源:robot.C

示例2: lego


//.........这里部分代码省略.........
 t1_1->SetLineColor(12);
top->AddNodeOverlap(t1_1,1,new TGeoCombiTrans(-5,2,1.5,new TGeoRotation("t1_1",-90,90,0)));

TGeoVolume *t2_1=geom->MakeTubs("t2_1",Iron,0,0.8,1,0,360);
 t2_1->SetLineColor(12);
top->AddNodeOverlap(t2_1,1,new TGeoCombiTrans(-5,-2,1.5,new TGeoRotation("t2_1",-90,90,0)));

TGeoVolume *fb1=geom->MakeTubs("fb1",Iron,2,2.3,1,100,260);
 fb1->SetLineColor(12);
top->AddNodeOverlap(fb1,1,new TGeoCombiTrans(-5,0,-1,new TGeoRotation("fb1",90,90,90)));



TGeoVolume *m1=geom->MakeBox("m1",Iron,7,8,4);
 m1->SetLineColor(2);
top->AddNodeOverlap(m1,1,new TGeoCombiTrans(0,0,-17,new TGeoRotation("m1",90,90,0)));

TGeoVolume *m2=geom->MakeTubs("m2",Iron,0,1,7,90,180);
 m2->SetLineColor(2);
top->AddNodeOverlap(m2,1,new TGeoCombiTrans(-3,0,-9,new TGeoRotation("m2",0,90,0)));

TGeoVolume *m3=geom->MakeTubs("m3",Iron,0,1,7,0,90);
 m3->SetLineColor(2);
top->AddNodeOverlap(m3,1,new TGeoCombiTrans(3,0,-9,new TGeoRotation("m3",0,90,0)));

TGeoVolume *m4=geom->MakeBox("m4",Iron,3,7,0.5);
 m4->SetLineColor(2);
top->AddNodeOverlap(m4,1,new TGeoCombiTrans(0,0,-8.5,new TGeoRotation("m4",90,0,90)));

TGeoVolume *m5=geom->MakeTubs("m5",Iron,0,1.5,1.2,0,0);
 m5->SetLineColor(5);
top->AddNodeOverlap(m5,1,new TGeoCombiTrans(0,0,-7.8,new TGeoRotation("m5",0,0,0)));

TGeoVolume *m6=geom->MakeTrd2("m6",Iron,4,4,0,2,8);
m6->SetLineColor(2);
top->AddNodeOverlap(m6,1,new TGeoCombiTrans(0,-7,-17,new TGeoRotation("m6",0,180,0)));

TGeoVolume *m7=geom->MakeTrd2("m7",Iron,4,4,0,2,8);
m7->SetLineColor(2);
top->AddNodeOverlap(m7,1,new TGeoCombiTrans(0,7,-17,new TGeoRotation("m7",0,180,0)));


TGeoVolume *md1=geom->MakeBox("md1",Iron,4,8.5,0.7);
 md1->SetLineColor(37);
top->AddNodeOverlap(md1,1,new TGeoCombiTrans(0,0,-25.5,new TGeoRotation("md1",0,0,0)));

TGeoVolume *md2=geom->MakeBox("md2",Iron,3,0.4,2);
md2->SetLineColor(37);
top->AddNodeOverlap(md2,1,new TGeoCombiTrans(0,0,-28,new TGeoRotation("md2",0,0,0)));

TGeoVolume *d1=geom->MakeTrd2("d1",Iron,3,4,4,4,7);
d1->SetLineColor(37);
top->AddNodeOverlap(d1,1,new TGeoCombiTrans(-4.8,4.5,-35,new TGeoRotation("d1",90,45,-90)));

TGeoVolume *d2=geom->MakeTrd2("d2",Iron,3,4,4,4,7);
d2->SetLineColor(37);
top->AddNodeOverlap(d2,1,new TGeoCombiTrans(0,-4.5,-37,new TGeoRotation("d2",0,0,0)));

TGeoVolume *d3=geom->MakeTubs("d3",Iron,0,4,3.98,0,180);
 d3->SetLineColor(37);
top->AddNodeOverlap(d3,1,new TGeoCombiTrans(0,4.5,-30.2,new TGeoRotation("d3",0,90,-45)));

TGeoVolume *d4=geom->MakeTubs("d4",Iron,0,4,3.98,0,180);
 d4->SetLineColor(37);
top->AddNodeOverlap(d4,1,new TGeoCombiTrans(0,-4.5,-30,new TGeoRotation("d4",0,90,0)));
开发者ID:digideskio,项目名称:root,代码行数:66,代码来源:lego.C


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