~ubuntu-branches/ubuntu/quantal/python-demgengeo/quantal

« back to all changes in this revision

Viewing changes to Python/BoxWithPlanes3DPy.cc

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2011-11-18 21:47:18 UTC
  • Revision ID: package-import@ubuntu.com-20111118214718-4ysqm3dhpqwdd7gd
Tags: upstream-0.99~bzr106
ImportĀ upstreamĀ versionĀ 0.99~bzr106

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////
 
2
//                                                         //
 
3
// Copyright (c) 2007-2011 by The University of Queensland //
 
4
// Earth Systems Science Computational Centre (ESSCC)      //
 
5
// http://www.uq.edu.au/esscc                              //
 
6
//                                                         //
 
7
// Primary Business: Brisbane, Queensland, Australia       //
 
8
// Licensed under the Open Software License version 3.0    //
 
9
// http://www.opensource.org/licenses/osl-3.0.php          //
 
10
//                                                         //
 
11
/////////////////////////////////////////////////////////////
 
12
 
 
13
#include <boost/version.hpp>
 
14
#include "BoxWithPlanes3DPy.h"
 
15
 
 
16
using namespace boost::python;
 
17
 
 
18
    void exportBoxWithPlanes3D()
 
19
    {
 
20
      // Check that Boost 1.34.0 or higher is being used.
 
21
      // If so, disable auto-generation of C++ signatures for Epydoc
 
22
      // (which stumbles over indentation in the auto-generated strings).
 
23
      #if ((BOOST_VERSION / 100000 >= 1) \
 
24
          && (BOOST_VERSION / 100 % 1000 >= 34)) \
 
25
          || (BOOST_VERSION / 100000 >= 2)
 
26
        boost::python::docstring_options no_autogen(true,false);
 
27
      #endif
 
28
 
 
29
      class_<BoxWithPlanes3D, bases<AVolume3D> >(
 
30
        "BoxWithPlanes3D",
 
31
        "A class defining a rectangular volume in 3D optionally bounded by planes.",
 
32
        init<>()
 
33
      )
 
34
      .def(init<const BoxWithPlanes3D &>())
 
35
      .def(
 
36
        init<Vector3,Vector3>(
 
37
          ( arg("minPoint"), arg("maxPoint") ),
 
38
          "Constructs a box with the specified corner points.\n"
 
39
          "@type minPoint: L{Vector3}\n"
 
40
          "@kwarg minPoint: Coordinate of bottom-left-front corner of the box\n"
 
41
          "@type maxPoint: L{Vector3}\n"
 
42
          "@kwarg maxPoint: Coordinate of upper-right-back corner of the box\n"
 
43
        )
 
44
      )
 
45
      .def(
 
46
        "addPlane",
 
47
        &BoxWithPlanes3D::addPlane,
 
48
        ( arg("plane") ),
 
49
        "Adds a plane to the box for fitting particles.\n"
 
50
        "@type plane: L{Plane}\n"
 
51
        "@kwarg plane: the plane to add to the box\n"
 
52
        "@rtype: void\n"
 
53
      )
 
54
      .def(self_ns::str(self))
 
55
      ;
 
56
//      boost::python::implicitly_convertible<BoxWithPlanes3D, AVolume2D>();
 
57
    }
 
58
 
 
59
 
 
60