1
/////////////////////////////////////////////////////////////
3
// Copyright (c) 2007-2011 by The University of Queensland //
4
// Earth Systems Science Computational Centre (ESSCC) //
5
// http://www.uq.edu.au/esscc //
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 //
11
/////////////////////////////////////////////////////////////
13
#include <boost/version.hpp>
14
#include "LineSegment2DPy.h"
16
using namespace boost::python;
18
using boost::python::arg;
19
void exportLineSegment2D()
21
// Check that Boost 1.34.0 or higher is being used.
22
// If so, disable auto-generation of C++ signatures for Epydoc
23
// (which stumbles over indentation in the auto-generated strings).
24
#if ((BOOST_VERSION / 100000 >= 1) \
25
&& (BOOST_VERSION / 100 % 1000 >= 34)) \
26
|| (BOOST_VERSION / 100000 >= 2)
27
boost::python::docstring_options no_autogen(true,false);
30
class_<LineSegment2D, bases<Line2D> >(
32
"A class defining a line segment in 2 dimensions.",
35
.def(init<const LineSegment2D &>())
37
init<Vector3,Vector3>(
38
( arg("startPoint"), arg("endPoint") ),
39
"Constructs a 2D line with specified endpoints.\n"
40
"N.B. This is not an L{AVolume2D} so cannot be used with C{InsertGenerators}.\n"
41
"@type startPoint: L{Vector3}\n"
42
"@kwarg startPoint: the starting point of the line\n"
43
"@type endPoint: L{Vector3}\n"
44
"@kwarg endPoint: the end point of the line\n"
47
.def(self_ns::str(self))