~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

Viewing changes to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * ***** BEGIN GPL LICENSE BLOCK *****
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License
 
6
 * as published by the Free Software Foundation; either version 2
 
7
 * of the License, or (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software Foundation,
 
16
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
17
 *
 
18
 * ***** END GPL LICENSE BLOCK *****
 
19
 */
 
20
 
 
21
/** \file source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
 
22
 *  \ingroup freestyle
 
23
 */
 
24
 
 
25
#include "BPy_GetYF1D.h"
 
26
 
 
27
#include "../../../view_map/Functions1D.h"
 
28
#include "../../BPy_Convert.h"
 
29
#include "../../BPy_IntegrationType.h"
 
30
 
 
31
#ifdef __cplusplus
 
32
extern "C" {
 
33
#endif
 
34
 
 
35
///////////////////////////////////////////////////////////////////////////////////////////
 
36
 
 
37
//------------------------INSTANCE METHODS ----------------------------------
 
38
 
 
39
static char GetYF1D___doc__[] =
 
40
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DDouble` > :class:`GetYF1D`\n"
 
41
"\n"
 
42
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
 
43
"\n"
 
44
"   Builds a GetYF1D object.\n"
 
45
"\n"
 
46
"   :arg integration_type: The integration method used to compute a single value\n"
 
47
"      from a set of values.\n"
 
48
"   :type integration_type: :class:`IntegrationType`\n"
 
49
"\n"
 
50
".. method:: __call__(inter)\n"
 
51
"\n"
 
52
"   Returns the Y 3D coordinate of an Interface1D.\n"
 
53
"\n"
 
54
"   :arg inter: An Interface1D object.\n"
 
55
"   :type inter: :class:`Interface1D`\n"
 
56
"   :return: The Y 3D coordinate of the Interface1D.\n"
 
57
"   :rtype: float\n";
 
58
 
 
59
static int GetYF1D___init__(BPy_GetYF1D *self, PyObject *args, PyObject *kwds)
 
60
{
 
61
        static const char *kwlist[] = {"integration_type", NULL};
 
62
        PyObject *obj = 0;
 
63
 
 
64
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
 
65
                return -1;
 
66
        IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
 
67
        self->py_uf1D_double.uf1D_double = new Functions1D::GetYF1D(t);
 
68
        return 0;
 
69
}
 
70
/*-----------------------BPy_GetYF1D type definition ------------------------------*/
 
71
 
 
72
PyTypeObject GetYF1D_Type = {
 
73
        PyVarObject_HEAD_INIT(NULL, 0)
 
74
        "GetYF1D",                      /* tp_name */
 
75
        sizeof(BPy_GetYF1D),            /* tp_basicsize */
 
76
        0,                              /* tp_itemsize */
 
77
        0,                              /* tp_dealloc */
 
78
        0,                              /* tp_print */
 
79
        0,                              /* tp_getattr */
 
80
        0,                              /* tp_setattr */
 
81
        0,                              /* tp_reserved */
 
82
        0,                              /* tp_repr */
 
83
        0,                              /* tp_as_number */
 
84
        0,                              /* tp_as_sequence */
 
85
        0,                              /* tp_as_mapping */
 
86
        0,                              /* tp_hash  */
 
87
        0,                              /* tp_call */
 
88
        0,                              /* tp_str */
 
89
        0,                              /* tp_getattro */
 
90
        0,                              /* tp_setattro */
 
91
        0,                              /* tp_as_buffer */
 
92
        Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
 
93
        GetYF1D___doc__,                /* tp_doc */
 
94
        0,                              /* tp_traverse */
 
95
        0,                              /* tp_clear */
 
96
        0,                              /* tp_richcompare */
 
97
        0,                              /* tp_weaklistoffset */
 
98
        0,                              /* tp_iter */
 
99
        0,                              /* tp_iternext */
 
100
        0,                              /* tp_methods */
 
101
        0,                              /* tp_members */
 
102
        0,                              /* tp_getset */
 
103
        &UnaryFunction1DDouble_Type,    /* tp_base */
 
104
        0,                              /* tp_dict */
 
105
        0,                              /* tp_descr_get */
 
106
        0,                              /* tp_descr_set */
 
107
        0,                              /* tp_dictoffset */
 
108
        (initproc)GetYF1D___init__,     /* tp_init */
 
109
        0,                              /* tp_alloc */
 
110
        0,                              /* tp_new */
 
111
};
 
112
 
 
113
///////////////////////////////////////////////////////////////////////////////////////////
 
114
 
 
115
#ifdef __cplusplus
 
116
}
 
117
#endif