File: TestCone.cpp

package info (click to toggle)
vecgeom 1.2.8%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 24,016 kB
  • sloc: cpp: 88,803; ansic: 6,888; python: 1,035; sh: 582; sql: 538; makefile: 23
file content (38 lines) | stat: -rw-r--r-- 859 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * TestCone.cpp
 *
 *  Created on: May 14, 2014
 *      Author: swenzel
 */

#include "VecGeom/volumes/Cone.h"
#include "VecGeom/volumes/LogicalVolume.h"
#include "VecGeom/base/Transformation3D.h"
#include <cstdio>

// to test compilation and functionality of the cone
using namespace vecgeom;

struct SomeCone {
};

void testInstantiation()
{
  UnplacedCone acone(10, 20, 15, 25, 100, 0, 2. * M_PI);

  // some basic tests here to test the interface
  acone.Print();
  double volume = acone.Capacity();
  printf("have volume %lf\n", volume);

  Transformation3D *t = new Transformation3D();
  // test instanteation of a concrete placed specialized shape
  SpecializedCone<translation::kIdentity, rotation::kIdentity, SomeCone> scone(new LogicalVolume(&acone), t);

  printf("have volume %lf\n", scone.Capacity());
}

int main()
{
  testInstantiation();
}