File: bounds.hh

package info (click to toggle)
openstructure 2.9.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 205,228 kB
  • sloc: cpp: 188,129; python: 35,361; ansic: 34,298; fortran: 3,275; sh: 286; xml: 146; makefile: 29
file content (36 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (4)
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
#ifndef OST_MOL_EXPORT_BOUNDS_HH
#define OST_MOL_EXPORT_BOUNDS_HH

#include <ost/log.hh>
  
template <typename H>
geom::Vec3 geom_center(const H& h)
{
  return h.GetBounds().GetCenter();
}

template <typename H>
geom::Vec3 geom_size(const H& h)
{
  WARN_DEPRECATED("GetBoundarySize()/boundary_size is deprecated. Use "
                  "bounds.size instead")
  return h.GetBounds().GetSize();
}

template <typename H>
geom::Vec3 geom_start(const H& h)
{
  WARN_DEPRECATED("GetGeometricStart()/geometric_start is deprecated. Use "
                  "bounds.min instead")
  return h.GetBounds().GetMin();
}

template <typename H>
geom::Vec3 geom_end(const H& h)
{
  WARN_DEPRECATED("GetGeometricEnd()/geometric_end is deprecated. Use "
                  "bounds.max instead")
  return h.GetBounds().GetMax();
}

#endif