File: ScaledShapeStruct.h

package info (click to toggle)
vecgeom 1.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 23,928 kB
  • sloc: cpp: 88,717; ansic: 6,894; python: 1,035; sh: 582; sql: 538; makefile: 29
file content (39 lines) | stat: -rw-r--r-- 903 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
39
/*
 * ScaledShapeStruct.h
 *
 *  Created on: 22.08.2016
 *      Author: mgheata
 */

#ifndef VECGEOM_VOLUMES_SCALEDSHAPESTRUCT_H_
#define VECGEOM_VOLUMES_SCALEDSHAPESTRUCT_H_
#include "VecGeom/base/Global.h"
#include "VecGeom/base/Scale3D.h"

namespace vecgeom {

inline namespace VECGEOM_IMPL_NAMESPACE {

class VPlacedVolume;
/**
 * A plain struct without member functions to encapsulate just the parameters
 * of the scaled shape
 */
template <typename T = double>
struct ScaledShapeStruct {
  VPlacedVolume const *fPlaced; /// Need a placed volume for the navigation interface
  Scale3D fScale;               /// Scale object

  VECCORE_ATT_HOST_DEVICE
  ScaledShapeStruct() : fPlaced(nullptr), fScale() {}

  VECCORE_ATT_HOST_DEVICE
  ScaledShapeStruct(VPlacedVolume const *placed, Precision sx, Precision sy, Precision sz)
      : fPlaced(placed), fScale(sx, sy, sz)
  {
  }
};
}
} // end

#endif