diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bdb706d..058a04a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,9 @@ if (${PLYPATH} MATCHES "PLYPATH-NOTFOUND") MESSAGE(SEND ERRORS "ply reader header not found") endif (${PLYPATH} MATCHES "PLYPATH-NOTFOUND") +add_library(plyloader ${PLYPATH}/ply.c) +# install(FILES ${PLYPATH}/ply.h DESTINATION include/) + #TODO best way to just include embre folder ? set(GVT_THIRDPARTY_EMBREESHADERS "${CMAKE_SOURCE_DIR}/third-party/embree-shaders") @@ -429,7 +432,7 @@ endif(GVT_CORE) if (GVT_RENDER) set(GVT_RENDER_LIBS ${GVT_RENDER_LIBS}) - set(GVT_RENDER_LIBS ${GVT_RENDER_LIBS} tinyobjloader ${ICET_CORE_LIBS} ${ICET_MPI_LIBS}) + set(GVT_RENDER_LIBS ${GVT_RENDER_LIBS} tinyobjloader plyloader ${ICET_CORE_LIBS} ${ICET_MPI_LIBS}) include_directories(${TINYOBJPATH} ${PLYPATH}) # find_package(Boost REQUIRED COMPONENTS system) diff --git a/data/wavelet_color/wavelet.ply b/data/wavelet_color/wavelet.ply new file mode 100644 index 00000000..0317ab76 Binary files /dev/null and b/data/wavelet_color/wavelet.ply differ diff --git a/pygvt/README.md b/pygvt/README.md index 78d14f3d..8f081c21 100644 --- a/pygvt/README.md +++ b/pygvt/README.md @@ -41,3 +41,14 @@ display bunny.ppm display wavelet.ppm display block0.ppm ``` +``` +Set GVT model directory. This is optional. +export GVT_MODELS=/work/03378/hpark/maverick/gvtmodels + +source test_example_plyapp.sh +display wavelet_color.ppm +display EnzoPlyData.ppm + +If GVT_MODELS is set, open enzocolor.ppm. +display enzocolor.ppm +``` diff --git a/pygvt/example_plyapp.py b/pygvt/example_plyapp.py new file mode 100644 index 00000000..b24c1a5b --- /dev/null +++ b/pygvt/example_plyapp.py @@ -0,0 +1,71 @@ +import gvt +import reader as rd +import sys +import os +import numpy as np +import argparse + +# parse command line +parser = argparse.ArgumentParser(description='A PYGVT example to render a model in obj/ply/vtp format.') +parser.add_argument('dirname', help='directory name') +parser.add_argument('--image-size', nargs=2, default=[512, 512], help='image width and height') +parser.add_argument('--light-color', nargs=3, default=[100.0, 100.0, 100.0], help='light color') +parser.add_argument('--diffuse-color', nargs=3, default=[1.0, 1.0, 1.0], help='diffuse color for surfaces') +parser.add_argument('--camera-distance', nargs=1, type=float, default=[1.0], help='camera distance factor (the larger the farther)') +args = parser.parse_args() + +# set filename +# filename = args.filename +dirname = args.dirname + +# initialize gvt +gvt.gvtInit() + +# create a mesh +model_name = os.path.basename(dirname).split(".")[0] + +bounds = np.zeros((6,), dtype=np.float32) +gvt.readPly(dirname, False, bounds) + +bounds = np.reshape(bounds, (2,3)) +diagonal = np.linalg.norm(bounds[1] - bounds[0]) +center = (bounds[0] + bounds[1]) * 0.5 + +print("bounds_min: ", bounds[0]) +print("bounds_max: ", bounds[1]) +print("diagonal: ", diagonal) +print("center: ", center) + +# camera +camera_pos = (center + (np.array([0.0, 0.0, 1.0], dtype=np.float32) * (args.camera_distance[0] * diagonal))).astype(np.float32) +camera_focus = center.astype(np.float32) + +gvt.addCamera("Camera", camera_pos, camera_focus, + # up + np.array([0.0, 1.0, 0.0], dtype=np.float32), + # fov, depth, samples, jitter + 0.785398, 1, 1, 0.5) + +# light source +# TODO: make this configurable +# locate a point light at the camera position +# light_pos = (r.center + (np.array([0.0, 1.0, 0.0], dtype=np.float32) * r.diagonal)).astype(np.float32) +light_pos = camera_pos +# TODO: make this configurable +light_color = np.array(args.light_color, dtype=np.float32) + +gvt.addPointLight("PointLight", light_pos, light_color) + +# set image size +gvt.addFilm("film", args.image_size[0], args.image_size[1], model_name) + +# add renderer +gvt.addRenderer("render", 4, 0) # name, adapter, schedule; +gvt.render("render"); + +# dump the image to a ppm file +gvt.writeimage("render", model_name); + +print("created " + model_name + ".ppm") + + diff --git a/pygvt/example_reader.py b/pygvt/example_reader.py index f008497d..3aba1683 100644 --- a/pygvt/example_reader.py +++ b/pygvt/example_reader.py @@ -10,7 +10,7 @@ parser.add_argument('--image-size', nargs=2, default=[512, 512], help='image width and height') parser.add_argument('--light-color', nargs=3, default=[100.0, 100.0, 100.0], help='light color') parser.add_argument('--diffuse-color', nargs=3, default=[1.0, 1.0, 1.0], help='diffuse color for surfaces') -parser.add_argument('--camera-distance', nargs=1, default=1.0, help='camera distance factor (the larger the farther)') +parser.add_argument('--camera-distance', nargs=1, type=float, default=[1.0], help='camera distance factor (the larger the farther)') args = parser.parse_args() # set filename @@ -43,8 +43,11 @@ gvt.addInstance(mesh_name, np.array([1.0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 1.0], dtype=np.float32)) # camera -camera_pos = (r.center + (np.array([0.0, 0.0, 1.0], dtype=np.float32) * (args.camera_distance * r.diagonal))).astype(np.float32) +camera_pos = (r.center + (np.array([0.0, 0.0, 1.0], dtype=np.float32) * (args.camera_distance[0] * r.diagonal))).astype(np.float32) camera_focus = r.center.astype(np.float32) +# print("diagonal:", r.diagonal) +print("camera pos:", camera_pos) +print("camera focus: ", camera_focus) gvt.addCamera("Camera", camera_pos, camera_focus, # up diff --git a/pygvt/setup.py b/pygvt/setup.py index 03a428bf..55e71149 100644 --- a/pygvt/setup.py +++ b/pygvt/setup.py @@ -57,7 +57,6 @@ compile_args.append('-stdlib=libc++') mpi_mac="-mt" - extensions = [ Extension("gvt",["src/gvt/gvt.pyx"], include_dirs = [ @@ -72,15 +71,14 @@ numpy.get_include()], libraries = [ "gvtRender","gvtCore", + "plyloader", "IceTGL","IceTMPI","IceTCore", "embree", "boost_system"+mpi_mac, "mpi", "mpicxx", "irc", - "imf", - - + "imf" ], library_dirs = [ embree_lib, @@ -99,5 +97,5 @@ cmdclass = {"build_ext": build_ext}, version="1.0.0", ext_modules = extensions - #ext_modules = cythonize(extensions) + # ext_modules = cythonize(extensions) ) diff --git a/pygvt/src/gvt/gvt.cpp b/pygvt/src/gvt/gvt.cpp index c5d9cd9a..3968e74a 100644 --- a/pygvt/src/gvt/gvt.cpp +++ b/pygvt/src/gvt/gvt.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 0.25.2 */ +/* Generated by Cython 0.26 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,7 +7,7 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else -#define CYTHON_ABI "0_25_2" +#define CYTHON_ABI "0_26" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) @@ -29,6 +29,7 @@ #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif +#define __PYX_COMMA , #ifndef HAVE_LONG_LONG #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000) #define HAVE_LONG_LONG @@ -181,16 +182,20 @@ #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif -#ifndef METH_FASTCALL - #define METH_FASTCALL 0x80 - typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, - Py_ssize_t nargs, PyObject *kwnames); +#if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args, + Py_ssize_t nargs, PyObject *kwnames); #else #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ - ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST))))) + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif @@ -317,6 +322,12 @@ #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods @@ -371,6 +382,35 @@ # endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #ifdef __cplusplus + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) || (defined(__GNUC__) && defined(__attribute__)) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif #ifndef __cplusplus #error "Cython files generated with the C++ option must be compiled with a C++ compiler." @@ -498,8 +538,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif -static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); -static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString @@ -512,8 +552,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif -#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) @@ -635,10 +678,12 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static PyObject *__pyx_empty_unicode; @@ -672,9 +717,9 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { "src/gvt/gvt.pyx", - "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd", + "__init__.pxd", "stringsource", - "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/cpython/type.pxd", + "type.pxd", }; /* BufferFormatStructs.proto */ #define IS_UNSIGNED(type) (((type) -1) > 0) @@ -713,7 +758,7 @@ typedef struct { } __Pyx_BufFmt_Context; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":725 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":725 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -722,7 +767,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":726 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":726 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -731,7 +776,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":727 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":727 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -740,7 +785,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":728 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":728 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -749,7 +794,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":732 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":732 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -758,7 +803,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":733 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":733 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -767,7 +812,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":734 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":734 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -776,7 +821,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":735 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":735 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -785,7 +830,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":739 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":739 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -794,7 +839,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":740 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":740 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -803,7 +848,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":749 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":749 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -812,7 +857,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":750 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":750 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< @@ -821,7 +866,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_long_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":751 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":751 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -830,7 +875,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":753 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":753 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -839,7 +884,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":754 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":754 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< @@ -848,7 +893,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":755 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":755 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -857,7 +902,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":757 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":757 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -866,7 +911,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":758 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":758 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -875,7 +920,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":760 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":760 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -884,7 +929,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":761 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":761 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -893,7 +938,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":762 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":762 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -928,7 +973,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do /*--- Type declarations ---*/ -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":764 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":764 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -937,7 +982,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":765 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":765 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -946,7 +991,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":766 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":766 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -955,7 +1000,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":768 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":768 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -1028,10 +1073,31 @@ typedef npy_cdouble __pyx_t_5numpy_complex_t; #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + /* ArgTypeTest.proto */ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); +/* BufferFormatCheck.proto */ +static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, + __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type); + /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { @@ -1088,27 +1154,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif -/* RaiseArgTupleInvalid.proto */ -static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, - Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); - -/* RaiseDoubleKeywords.proto */ -static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); - -/* ParseKeywords.proto */ -static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ - PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ - const char* function_name); - -/* BufferFormatCheck.proto */ -static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, - __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); -static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); -static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); -static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, - __Pyx_BufFmt_StackElem* stack, - __Pyx_TypeInfo* type); // PROTO - /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; @@ -1202,6 +1247,9 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); +/* CLineInTraceback.proto */ +static int __Pyx_CLineForTraceback(int c_line); + /* CodeObjectCache.proto */ typedef struct { PyCodeObject* code_object; @@ -1445,6 +1493,7 @@ static const char __pyx_k_fov[] = "fov"; static const char __pyx_k_gvt[] = "gvt"; static const char __pyx_k_pos[] = "pos"; static const char __pyx_k_sys[] = "sys"; +static const char __pyx_k_dist[] = "dist"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_name[] = "name"; static const char __pyx_k_path[] = "path"; @@ -1464,9 +1513,11 @@ static const char __pyx_k_output[] = "output"; static const char __pyx_k_render[] = "render"; static const char __pyx_k_adapter[] = "adapter"; static const char __pyx_k_addFilm[] = "addFilm"; +static const char __pyx_k_dirname[] = "dirname"; static const char __pyx_k_gvtInit[] = "gvtInit"; static const char __pyx_k_mattype[] = "mattype"; static const char __pyx_k_normals[] = "normals"; +static const char __pyx_k_readPly[] = "readPly"; static const char __pyx_k_samples[] = "samples"; static const char __pyx_k_schedule[] = "schedule"; static const char __pyx_k_vertices[] = "vertices"; @@ -1484,16 +1535,18 @@ static const char __pyx_k_modifyLight[] = "modifyLight"; static const char __pyx_k_RuntimeError[] = "RuntimeError"; static const char __pyx_k_addAreaLight[] = "addAreaLight"; static const char __pyx_k_modifyCamera[] = "modifyCamera"; +static const char __pyx_k_world_bounds[] = "world_bounds"; static const char __pyx_k_addPointLight[] = "addPointLight"; static const char __pyx_k_compute_normal[] = "compute_normal"; static const char __pyx_k_addMeshVertices[] = "addMeshVertices"; +static const char __pyx_k_src_gvt_gvt_pyx[] = "src/gvt/gvt.pyx"; static const char __pyx_k_addMeshTriangles[] = "addMeshTriangles"; static const char __pyx_k_addMeshFaceNormals[] = "addMeshFaceNormals"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_addMeshVertexNormals[] = "addMeshVertexNormals"; static const char __pyx_k_addMeshMaterialLambert[] = "addMeshMaterialLambert"; static const char __pyx_k_addMeshMaterialSpecular[] = "addMeshMaterialSpecular"; static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; -static const char __pyx_k_home_jbarbosa_r_pygvt_src_gvt_g[] = "/home/jbarbosa/r/pygvt/src/gvt/gvt.pyx"; static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; @@ -1521,11 +1574,14 @@ static PyObject *__pyx_n_s_addMeshVertices; static PyObject *__pyx_n_s_addPointLight; static PyObject *__pyx_n_s_addRenderer; static PyObject *__pyx_n_s_alpha; +static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_color; static PyObject *__pyx_n_s_compute_normal; static PyObject *__pyx_n_s_createMesh; static PyObject *__pyx_n_s_ctypes; static PyObject *__pyx_n_s_depth; +static PyObject *__pyx_n_s_dirname; +static PyObject *__pyx_n_s_dist; static PyObject *__pyx_n_s_encode; static PyObject *__pyx_n_s_finishMesh; static PyObject *__pyx_n_s_focus; @@ -1533,7 +1589,6 @@ static PyObject *__pyx_n_s_fov; static PyObject *__pyx_n_s_gvt; static PyObject *__pyx_n_s_gvtInit; static PyObject *__pyx_n_s_h; -static PyObject *__pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_jitter; static PyObject *__pyx_n_s_kd; @@ -1557,10 +1612,12 @@ static PyObject *__pyx_n_s_output; static PyObject *__pyx_n_s_path; static PyObject *__pyx_n_s_pos; static PyObject *__pyx_n_s_range; +static PyObject *__pyx_n_s_readPly; static PyObject *__pyx_n_s_render; static PyObject *__pyx_n_s_samples; static PyObject *__pyx_n_s_schedule; static PyObject *__pyx_n_s_size; +static PyObject *__pyx_kp_s_src_gvt_gvt_pyx; static PyObject *__pyx_n_s_sys; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_triangles; @@ -1568,28 +1625,30 @@ static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_up; static PyObject *__pyx_n_s_vertices; static PyObject *__pyx_n_s_w; +static PyObject *__pyx_n_s_world_bounds; static PyObject *__pyx_n_s_writeimage; static PyObject *__pyx_pf_3gvt_gvtInit(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ -static PyObject *__pyx_pf_3gvt_2createMesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */ -static PyObject *__pyx_pf_3gvt_4addMeshVertices(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_size, PyArrayObject *__pyx_v_vertices); /* proto */ -static PyObject *__pyx_pf_3gvt_6addMeshTriangles(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_triangles); /* proto */ -static PyObject *__pyx_pf_3gvt_8addMeshFaceNormals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_normals); /* proto */ -static PyObject *__pyx_pf_3gvt_10addMeshVertexNormals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_normals); /* proto */ -static PyObject *__pyx_pf_3gvt_12finishMesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, bool __pyx_v_compute_normal); /* proto */ -static PyObject *__pyx_pf_3gvt_14addMeshMaterialLambert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_mattype, PyArrayObject *__pyx_v_kd, float __pyx_v_alpha); /* proto */ -static PyObject *__pyx_pf_3gvt_16addMeshMaterialSpecular(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_mattype, PyArrayObject *__pyx_v_kd, PyArrayObject *__pyx_v_ks, float __pyx_v_alpha); /* proto */ -static PyObject *__pyx_pf_3gvt_18addInstance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_m); /* proto */ -static PyObject *__pyx_pf_3gvt_20addPointLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color); /* proto */ -static PyObject *__pyx_pf_3gvt_22addAreaLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color, PyArrayObject *__pyx_v_n, float __pyx_v_w, float __pyx_v_h); /* proto */ -static PyObject *__pyx_pf_3gvt_24modifyLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color); /* proto */ -static PyObject *__pyx_pf_3gvt_26modifyLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color, PyArrayObject *__pyx_v_n, float __pyx_v_w, float __pyx_v_h); /* proto */ -static PyObject *__pyx_pf_3gvt_28addCamera(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_focus, PyArrayObject *__pyx_v_up, float __pyx_v_fov, int __pyx_v_depth, int __pyx_v_samples, float __pyx_v_jitter); /* proto */ -static PyObject *__pyx_pf_3gvt_30modifyCamera(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_focus, PyArrayObject *__pyx_v_up, float __pyx_v_fov); /* proto */ -static PyObject *__pyx_pf_3gvt_32addFilm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_w, int __pyx_v_h, PyObject *__pyx_v_path); /* proto */ -static PyObject *__pyx_pf_3gvt_34modifyFilm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_w, int __pyx_v_h, PyObject *__pyx_v_path); /* proto */ -static PyObject *__pyx_pf_3gvt_36addRenderer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_adapter, int __pyx_v_schedule); /* proto */ -static PyObject *__pyx_pf_3gvt_38render(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */ -static PyObject *__pyx_pf_3gvt_40writeimage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_output); /* proto */ +static PyObject *__pyx_pf_3gvt_2readPly(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dirname, bool __pyx_v_dist, PyArrayObject *__pyx_v_world_bounds); /* proto */ +static PyObject *__pyx_pf_3gvt_4createMesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_3gvt_6addMeshVertices(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_size, PyArrayObject *__pyx_v_vertices); /* proto */ +static PyObject *__pyx_pf_3gvt_8addMeshTriangles(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_triangles); /* proto */ +static PyObject *__pyx_pf_3gvt_10addMeshFaceNormals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_normals); /* proto */ +static PyObject *__pyx_pf_3gvt_12addMeshVertexNormals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_normals); /* proto */ +static PyObject *__pyx_pf_3gvt_14finishMesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, bool __pyx_v_compute_normal); /* proto */ +static PyObject *__pyx_pf_3gvt_16addMeshMaterialLambert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_mattype, PyArrayObject *__pyx_v_kd, float __pyx_v_alpha); /* proto */ +static PyObject *__pyx_pf_3gvt_18addMeshMaterialSpecular(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_mattype, PyArrayObject *__pyx_v_kd, PyArrayObject *__pyx_v_ks, float __pyx_v_alpha); /* proto */ +static PyObject *__pyx_pf_3gvt_20addInstance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_m); /* proto */ +static PyObject *__pyx_pf_3gvt_22addPointLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color); /* proto */ +static PyObject *__pyx_pf_3gvt_24addAreaLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color, PyArrayObject *__pyx_v_n, float __pyx_v_w, float __pyx_v_h); /* proto */ +static PyObject *__pyx_pf_3gvt_26modifyLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color); /* proto */ +static PyObject *__pyx_pf_3gvt_28modifyLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color, PyArrayObject *__pyx_v_n, float __pyx_v_w, float __pyx_v_h); /* proto */ +static PyObject *__pyx_pf_3gvt_30addCamera(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_focus, PyArrayObject *__pyx_v_up, float __pyx_v_fov, int __pyx_v_depth, int __pyx_v_samples, float __pyx_v_jitter); /* proto */ +static PyObject *__pyx_pf_3gvt_32modifyCamera(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_focus, PyArrayObject *__pyx_v_up, float __pyx_v_fov); /* proto */ +static PyObject *__pyx_pf_3gvt_34addFilm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_w, int __pyx_v_h, PyObject *__pyx_v_path); /* proto */ +static PyObject *__pyx_pf_3gvt_36modifyFilm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_w, int __pyx_v_h, PyObject *__pyx_v_path); /* proto */ +static PyObject *__pyx_pf_3gvt_38addRenderer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_adapter, int __pyx_v_schedule); /* proto */ +static PyObject *__pyx_pf_3gvt_40render(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_3gvt_42writeimage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_output); /* proto */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ static PyObject *__pyx_tuple_; @@ -1621,6 +1680,7 @@ static PyObject *__pyx_tuple__43; static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__47; static PyObject *__pyx_tuple__49; +static PyObject *__pyx_tuple__51; static PyObject *__pyx_codeobj__10; static PyObject *__pyx_codeobj__12; static PyObject *__pyx_codeobj__14; @@ -1642,8 +1702,9 @@ static PyObject *__pyx_codeobj__44; static PyObject *__pyx_codeobj__46; static PyObject *__pyx_codeobj__48; static PyObject *__pyx_codeobj__50; +static PyObject *__pyx_codeobj__52; -/* "gvt.pyx":44 +/* "gvt.pyx":45 * #void gvtInit(int &argc, char **&argv) * * def gvtInit(): # <<<<<<<<<<<<<< @@ -1670,7 +1731,7 @@ static PyObject *__pyx_pf_3gvt_gvtInit(CYTHON_UNUSED PyObject *__pyx_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("gvtInit", 0); - /* "gvt.pyx":51 + /* "gvt.pyx":52 * # free(c_argv) * * _gvtInit(0,NULL); # <<<<<<<<<<<<<< @@ -1679,7 +1740,7 @@ static PyObject *__pyx_pf_3gvt_gvtInit(CYTHON_UNUSED PyObject *__pyx_self) { */ gvtInit(0, NULL); - /* "gvt.pyx":44 + /* "gvt.pyx":45 * #void gvtInit(int &argc, char **&argv) * * def gvtInit(): # <<<<<<<<<<<<<< @@ -1694,23 +1755,193 @@ static PyObject *__pyx_pf_3gvt_gvtInit(CYTHON_UNUSED PyObject *__pyx_self) { return __pyx_r; } -/* "gvt.pyx":66 +/* "gvt.pyx":67 + * # _gvtInit(argc,argv) + * + * def readPly(str dirname, bool dist, np.ndarray[float, ndim=1, mode="c"] world_bounds): # <<<<<<<<<<<<<< + * _readPly(dirname.encode(), dist, world_bounds.data) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_3gvt_3readPly(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_3readPly = {"readPly", (PyCFunction)__pyx_pw_3gvt_3readPly, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_3readPly(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_dirname = 0; + bool __pyx_v_dist; + PyArrayObject *__pyx_v_world_bounds = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("readPly (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dirname,&__pyx_n_s_dist,&__pyx_n_s_world_bounds,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dirname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dist)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("readPly", 1, 3, 3, 1); __PYX_ERR(0, 67, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_world_bounds)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("readPly", 1, 3, 3, 2); __PYX_ERR(0, 67, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "readPly") < 0)) __PYX_ERR(0, 67, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_dirname = ((PyObject*)values[0]); + __pyx_v_dist = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_dist == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 67, __pyx_L3_error) + __pyx_v_world_bounds = ((PyArrayObject *)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("readPly", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("gvt.readPly", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dirname), (&PyString_Type), 1, "dirname", 1))) __PYX_ERR(0, 67, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world_bounds), __pyx_ptype_5numpy_ndarray, 1, "world_bounds", 0))) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_2readPly(__pyx_self, __pyx_v_dirname, __pyx_v_dist, __pyx_v_world_bounds); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_3gvt_2readPly(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dirname, bool __pyx_v_dist, PyArrayObject *__pyx_v_world_bounds) { + __Pyx_LocalBuf_ND __pyx_pybuffernd_world_bounds; + __Pyx_Buffer __pyx_pybuffer_world_bounds; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + std::string __pyx_t_4; + __Pyx_RefNannySetupContext("readPly", 0); + __pyx_pybuffer_world_bounds.pybuffer.buf = NULL; + __pyx_pybuffer_world_bounds.refcount = 0; + __pyx_pybuffernd_world_bounds.data = NULL; + __pyx_pybuffernd_world_bounds.rcbuffer = &__pyx_pybuffer_world_bounds; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_world_bounds.rcbuffer->pybuffer, (PyObject*)__pyx_v_world_bounds, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 67, __pyx_L1_error) + } + __pyx_pybuffernd_world_bounds.diminfo[0].strides = __pyx_pybuffernd_world_bounds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_world_bounds.diminfo[0].shape = __pyx_pybuffernd_world_bounds.rcbuffer->pybuffer.shape[0]; + + /* "gvt.pyx":68 + * + * def readPly(str dirname, bool dist, np.ndarray[float, ndim=1, mode="c"] world_bounds): + * _readPly(dirname.encode(), dist, world_bounds.data) # <<<<<<<<<<<<<< + * + * def createMesh(str name): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirname, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (__pyx_t_3) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + readPly(__pyx_t_4, __pyx_v_dist, ((float *)__pyx_v_world_bounds->data)); + + /* "gvt.pyx":67 * # _gvtInit(argc,argv) * + * def readPly(str dirname, bool dist, np.ndarray[float, ndim=1, mode="c"] world_bounds): # <<<<<<<<<<<<<< + * _readPly(dirname.encode(), dist, world_bounds.data) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_world_bounds.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("gvt.readPly", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_world_bounds.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "gvt.pyx":70 + * _readPly(dirname.encode(), dist, world_bounds.data) + * * def createMesh(str name): # <<<<<<<<<<<<<< * _createMesh(name.encode()) * */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_3createMesh(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_3createMesh = {"createMesh", (PyCFunction)__pyx_pw_3gvt_3createMesh, METH_O, 0}; -static PyObject *__pyx_pw_3gvt_3createMesh(PyObject *__pyx_self, PyObject *__pyx_v_name) { +static PyObject *__pyx_pw_3gvt_5createMesh(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_5createMesh = {"createMesh", (PyCFunction)__pyx_pw_3gvt_5createMesh, METH_O, 0}; +static PyObject *__pyx_pw_3gvt_5createMesh(PyObject *__pyx_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("createMesh (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 66, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_2createMesh(__pyx_self, ((PyObject*)__pyx_v_name)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_4createMesh(__pyx_self, ((PyObject*)__pyx_v_name)); /* function exit code */ goto __pyx_L0; @@ -1721,7 +1952,7 @@ static PyObject *__pyx_pw_3gvt_3createMesh(PyObject *__pyx_self, PyObject *__pyx return __pyx_r; } -static PyObject *__pyx_pf_3gvt_2createMesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { +static PyObject *__pyx_pf_3gvt_4createMesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -1730,14 +1961,14 @@ static PyObject *__pyx_pf_3gvt_2createMesh(CYTHON_UNUSED PyObject *__pyx_self, P std::string __pyx_t_4; __Pyx_RefNannySetupContext("createMesh", 0); - /* "gvt.pyx":67 + /* "gvt.pyx":71 * * def createMesh(str name): * _createMesh(name.encode()) # <<<<<<<<<<<<<< * * def addMeshVertices(str name, int size, np.ndarray[float, ndim=1, mode="c"] vertices not None): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -1750,19 +1981,19 @@ static PyObject *__pyx_pf_3gvt_2createMesh(CYTHON_UNUSED PyObject *__pyx_self, P } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; createMesh(__pyx_t_4); - /* "gvt.pyx":66 - * # _gvtInit(argc,argv) + /* "gvt.pyx":70 + * _readPly(dirname.encode(), dist, world_bounds.data) * * def createMesh(str name): # <<<<<<<<<<<<<< * _createMesh(name.encode()) @@ -1784,7 +2015,7 @@ static PyObject *__pyx_pf_3gvt_2createMesh(CYTHON_UNUSED PyObject *__pyx_self, P return __pyx_r; } -/* "gvt.pyx":69 +/* "gvt.pyx":73 * _createMesh(name.encode()) * * def addMeshVertices(str name, int size, np.ndarray[float, ndim=1, mode="c"] vertices not None): # <<<<<<<<<<<<<< @@ -1793,9 +2024,9 @@ static PyObject *__pyx_pf_3gvt_2createMesh(CYTHON_UNUSED PyObject *__pyx_self, P */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_5addMeshVertices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_5addMeshVertices = {"addMeshVertices", (PyCFunction)__pyx_pw_3gvt_5addMeshVertices, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_5addMeshVertices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_7addMeshVertices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_7addMeshVertices = {"addMeshVertices", (PyCFunction)__pyx_pw_3gvt_7addMeshVertices, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_7addMeshVertices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; int __pyx_v_size; PyArrayObject *__pyx_v_vertices = 0; @@ -1810,8 +2041,11 @@ static PyObject *__pyx_pw_3gvt_5addMeshVertices(PyObject *__pyx_self, PyObject * const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -1820,19 +2054,21 @@ static PyObject *__pyx_pw_3gvt_5addMeshVertices(PyObject *__pyx_self, PyObject * case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshVertices", 1, 3, 3, 1); __PYX_ERR(0, 69, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshVertices", 1, 3, 3, 1); __PYX_ERR(0, 73, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vertices)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshVertices", 1, 3, 3, 2); __PYX_ERR(0, 69, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshVertices", 1, 3, 3, 2); __PYX_ERR(0, 73, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshVertices") < 0)) __PYX_ERR(0, 69, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshVertices") < 0)) __PYX_ERR(0, 73, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -1842,20 +2078,20 @@ static PyObject *__pyx_pw_3gvt_5addMeshVertices(PyObject *__pyx_self, PyObject * values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_name = ((PyObject*)values[0]); - __pyx_v_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L3_error) + __pyx_v_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) __pyx_v_vertices = ((PyArrayObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addMeshVertices", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 69, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshVertices", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addMeshVertices", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 69, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vertices), __pyx_ptype_5numpy_ndarray, 0, "vertices", 0))) __PYX_ERR(0, 69, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_4addMeshVertices(__pyx_self, __pyx_v_name, __pyx_v_size, __pyx_v_vertices); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vertices), __pyx_ptype_5numpy_ndarray, 0, "vertices", 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_6addMeshVertices(__pyx_self, __pyx_v_name, __pyx_v_size, __pyx_v_vertices); /* function exit code */ goto __pyx_L0; @@ -1866,7 +2102,7 @@ static PyObject *__pyx_pw_3gvt_5addMeshVertices(PyObject *__pyx_self, PyObject * return __pyx_r; } -static PyObject *__pyx_pf_3gvt_4addMeshVertices(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_size, PyArrayObject *__pyx_v_vertices) { +static PyObject *__pyx_pf_3gvt_6addMeshVertices(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_size, PyArrayObject *__pyx_v_vertices) { __Pyx_LocalBuf_ND __pyx_pybuffernd_vertices; __Pyx_Buffer __pyx_pybuffer_vertices; PyObject *__pyx_r = NULL; @@ -1882,18 +2118,18 @@ static PyObject *__pyx_pf_3gvt_4addMeshVertices(CYTHON_UNUSED PyObject *__pyx_se __pyx_pybuffernd_vertices.rcbuffer = &__pyx_pybuffer_vertices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertices, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 69, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertices, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 73, __pyx_L1_error) } __pyx_pybuffernd_vertices.diminfo[0].strides = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertices.diminfo[0].shape = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":70 + /* "gvt.pyx":74 * * def addMeshVertices(str name, int size, np.ndarray[float, ndim=1, mode="c"] vertices not None): * _addMeshVertices(name.encode(),size, vertices.data) # <<<<<<<<<<<<<< * * def addMeshTriangles(str name, unsigned n, np.ndarray[unsigned, ndim=1, mode="c"] triangles): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -1906,18 +2142,18 @@ static PyObject *__pyx_pf_3gvt_4addMeshVertices(CYTHON_UNUSED PyObject *__pyx_se } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addMeshVertices(__pyx_t_4, __pyx_v_size, ((float *)__pyx_v_vertices->data)); - /* "gvt.pyx":69 + /* "gvt.pyx":73 * _createMesh(name.encode()) * * def addMeshVertices(str name, int size, np.ndarray[float, ndim=1, mode="c"] vertices not None): # <<<<<<<<<<<<<< @@ -1949,7 +2185,7 @@ static PyObject *__pyx_pf_3gvt_4addMeshVertices(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "gvt.pyx":72 +/* "gvt.pyx":76 * _addMeshVertices(name.encode(),size, vertices.data) * * def addMeshTriangles(str name, unsigned n, np.ndarray[unsigned, ndim=1, mode="c"] triangles): # <<<<<<<<<<<<<< @@ -1958,9 +2194,9 @@ static PyObject *__pyx_pf_3gvt_4addMeshVertices(CYTHON_UNUSED PyObject *__pyx_se */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_7addMeshTriangles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_7addMeshTriangles = {"addMeshTriangles", (PyCFunction)__pyx_pw_3gvt_7addMeshTriangles, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_7addMeshTriangles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_9addMeshTriangles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_9addMeshTriangles = {"addMeshTriangles", (PyCFunction)__pyx_pw_3gvt_9addMeshTriangles, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_9addMeshTriangles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; unsigned int __pyx_v_n; PyArrayObject *__pyx_v_triangles = 0; @@ -1975,8 +2211,11 @@ static PyObject *__pyx_pw_3gvt_7addMeshTriangles(PyObject *__pyx_self, PyObject const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -1985,19 +2224,21 @@ static PyObject *__pyx_pw_3gvt_7addMeshTriangles(PyObject *__pyx_self, PyObject case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshTriangles", 1, 3, 3, 1); __PYX_ERR(0, 72, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshTriangles", 1, 3, 3, 1); __PYX_ERR(0, 76, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triangles)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshTriangles", 1, 3, 3, 2); __PYX_ERR(0, 72, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshTriangles", 1, 3, 3, 2); __PYX_ERR(0, 76, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshTriangles") < 0)) __PYX_ERR(0, 72, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshTriangles") < 0)) __PYX_ERR(0, 76, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -2007,20 +2248,20 @@ static PyObject *__pyx_pw_3gvt_7addMeshTriangles(PyObject *__pyx_self, PyObject values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_name = ((PyObject*)values[0]); - __pyx_v_n = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 72, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 76, __pyx_L3_error) __pyx_v_triangles = ((PyArrayObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addMeshTriangles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 72, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshTriangles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 76, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addMeshTriangles", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 72, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_triangles), __pyx_ptype_5numpy_ndarray, 1, "triangles", 0))) __PYX_ERR(0, 72, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_6addMeshTriangles(__pyx_self, __pyx_v_name, __pyx_v_n, __pyx_v_triangles); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 76, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_triangles), __pyx_ptype_5numpy_ndarray, 1, "triangles", 0))) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_8addMeshTriangles(__pyx_self, __pyx_v_name, __pyx_v_n, __pyx_v_triangles); /* function exit code */ goto __pyx_L0; @@ -2031,7 +2272,7 @@ static PyObject *__pyx_pw_3gvt_7addMeshTriangles(PyObject *__pyx_self, PyObject return __pyx_r; } -static PyObject *__pyx_pf_3gvt_6addMeshTriangles(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_triangles) { +static PyObject *__pyx_pf_3gvt_8addMeshTriangles(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_triangles) { __Pyx_LocalBuf_ND __pyx_pybuffernd_triangles; __Pyx_Buffer __pyx_pybuffer_triangles; PyObject *__pyx_r = NULL; @@ -2047,18 +2288,18 @@ static PyObject *__pyx_pf_3gvt_6addMeshTriangles(CYTHON_UNUSED PyObject *__pyx_s __pyx_pybuffernd_triangles.rcbuffer = &__pyx_pybuffer_triangles; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_unsigned_int, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 72, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_unsigned_int, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 76, __pyx_L1_error) } __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":73 + /* "gvt.pyx":77 * * def addMeshTriangles(str name, unsigned n, np.ndarray[unsigned, ndim=1, mode="c"] triangles): * _addMeshTriangles(name.encode(), n, triangles.data) # <<<<<<<<<<<<<< * * def addMeshFaceNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2071,18 +2312,18 @@ static PyObject *__pyx_pf_3gvt_6addMeshTriangles(CYTHON_UNUSED PyObject *__pyx_s } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addMeshTriangles(__pyx_t_4, __pyx_v_n, ((unsigned int *)__pyx_v_triangles->data)); - /* "gvt.pyx":72 + /* "gvt.pyx":76 * _addMeshVertices(name.encode(),size, vertices.data) * * def addMeshTriangles(str name, unsigned n, np.ndarray[unsigned, ndim=1, mode="c"] triangles): # <<<<<<<<<<<<<< @@ -2114,7 +2355,7 @@ static PyObject *__pyx_pf_3gvt_6addMeshTriangles(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "gvt.pyx":75 +/* "gvt.pyx":79 * _addMeshTriangles(name.encode(), n, triangles.data) * * def addMeshFaceNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): # <<<<<<<<<<<<<< @@ -2123,9 +2364,9 @@ static PyObject *__pyx_pf_3gvt_6addMeshTriangles(CYTHON_UNUSED PyObject *__pyx_s */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_9addMeshFaceNormals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_9addMeshFaceNormals = {"addMeshFaceNormals", (PyCFunction)__pyx_pw_3gvt_9addMeshFaceNormals, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_9addMeshFaceNormals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_11addMeshFaceNormals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_11addMeshFaceNormals = {"addMeshFaceNormals", (PyCFunction)__pyx_pw_3gvt_11addMeshFaceNormals, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_11addMeshFaceNormals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; unsigned int __pyx_v_n; PyArrayObject *__pyx_v_normals = 0; @@ -2140,8 +2381,11 @@ static PyObject *__pyx_pw_3gvt_9addMeshFaceNormals(PyObject *__pyx_self, PyObjec const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -2150,19 +2394,21 @@ static PyObject *__pyx_pw_3gvt_9addMeshFaceNormals(PyObject *__pyx_self, PyObjec case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshFaceNormals", 1, 3, 3, 1); __PYX_ERR(0, 75, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshFaceNormals", 1, 3, 3, 1); __PYX_ERR(0, 79, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_normals)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshFaceNormals", 1, 3, 3, 2); __PYX_ERR(0, 75, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshFaceNormals", 1, 3, 3, 2); __PYX_ERR(0, 79, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshFaceNormals") < 0)) __PYX_ERR(0, 75, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshFaceNormals") < 0)) __PYX_ERR(0, 79, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -2172,20 +2418,20 @@ static PyObject *__pyx_pw_3gvt_9addMeshFaceNormals(PyObject *__pyx_self, PyObjec values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_name = ((PyObject*)values[0]); - __pyx_v_n = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 79, __pyx_L3_error) __pyx_v_normals = ((PyArrayObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addMeshFaceNormals", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 75, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshFaceNormals", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 79, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addMeshFaceNormals", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 75, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normals), __pyx_ptype_5numpy_ndarray, 1, "normals", 0))) __PYX_ERR(0, 75, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_8addMeshFaceNormals(__pyx_self, __pyx_v_name, __pyx_v_n, __pyx_v_normals); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 79, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normals), __pyx_ptype_5numpy_ndarray, 1, "normals", 0))) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_10addMeshFaceNormals(__pyx_self, __pyx_v_name, __pyx_v_n, __pyx_v_normals); /* function exit code */ goto __pyx_L0; @@ -2196,7 +2442,7 @@ static PyObject *__pyx_pw_3gvt_9addMeshFaceNormals(PyObject *__pyx_self, PyObjec return __pyx_r; } -static PyObject *__pyx_pf_3gvt_8addMeshFaceNormals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_normals) { +static PyObject *__pyx_pf_3gvt_10addMeshFaceNormals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_normals) { __Pyx_LocalBuf_ND __pyx_pybuffernd_normals; __Pyx_Buffer __pyx_pybuffer_normals; PyObject *__pyx_r = NULL; @@ -2212,18 +2458,18 @@ static PyObject *__pyx_pf_3gvt_8addMeshFaceNormals(CYTHON_UNUSED PyObject *__pyx __pyx_pybuffernd_normals.rcbuffer = &__pyx_pybuffer_normals; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normals.rcbuffer->pybuffer, (PyObject*)__pyx_v_normals, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 75, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normals.rcbuffer->pybuffer, (PyObject*)__pyx_v_normals, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 79, __pyx_L1_error) } __pyx_pybuffernd_normals.diminfo[0].strides = __pyx_pybuffernd_normals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normals.diminfo[0].shape = __pyx_pybuffernd_normals.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":76 + /* "gvt.pyx":80 * * def addMeshFaceNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): * _addMeshFaceNormals(name.encode(), n, normals.data) # <<<<<<<<<<<<<< * * def addMeshVertexNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2236,18 +2482,18 @@ static PyObject *__pyx_pf_3gvt_8addMeshFaceNormals(CYTHON_UNUSED PyObject *__pyx } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addMeshFaceNormals(__pyx_t_4, __pyx_v_n, ((float *)__pyx_v_normals->data)); - /* "gvt.pyx":75 + /* "gvt.pyx":79 * _addMeshTriangles(name.encode(), n, triangles.data) * * def addMeshFaceNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): # <<<<<<<<<<<<<< @@ -2279,7 +2525,7 @@ static PyObject *__pyx_pf_3gvt_8addMeshFaceNormals(CYTHON_UNUSED PyObject *__pyx return __pyx_r; } -/* "gvt.pyx":78 +/* "gvt.pyx":82 * _addMeshFaceNormals(name.encode(), n, normals.data) * * def addMeshVertexNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): # <<<<<<<<<<<<<< @@ -2288,9 +2534,9 @@ static PyObject *__pyx_pf_3gvt_8addMeshFaceNormals(CYTHON_UNUSED PyObject *__pyx */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_11addMeshVertexNormals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_11addMeshVertexNormals = {"addMeshVertexNormals", (PyCFunction)__pyx_pw_3gvt_11addMeshVertexNormals, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_11addMeshVertexNormals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_13addMeshVertexNormals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_13addMeshVertexNormals = {"addMeshVertexNormals", (PyCFunction)__pyx_pw_3gvt_13addMeshVertexNormals, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_13addMeshVertexNormals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; unsigned int __pyx_v_n; PyArrayObject *__pyx_v_normals = 0; @@ -2305,8 +2551,11 @@ static PyObject *__pyx_pw_3gvt_11addMeshVertexNormals(PyObject *__pyx_self, PyOb const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -2315,19 +2564,21 @@ static PyObject *__pyx_pw_3gvt_11addMeshVertexNormals(PyObject *__pyx_self, PyOb case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshVertexNormals", 1, 3, 3, 1); __PYX_ERR(0, 78, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshVertexNormals", 1, 3, 3, 1); __PYX_ERR(0, 82, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_normals)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshVertexNormals", 1, 3, 3, 2); __PYX_ERR(0, 78, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshVertexNormals", 1, 3, 3, 2); __PYX_ERR(0, 82, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshVertexNormals") < 0)) __PYX_ERR(0, 78, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshVertexNormals") < 0)) __PYX_ERR(0, 82, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -2337,20 +2588,20 @@ static PyObject *__pyx_pw_3gvt_11addMeshVertexNormals(PyObject *__pyx_self, PyOb values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_name = ((PyObject*)values[0]); - __pyx_v_n = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 78, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L3_error) __pyx_v_normals = ((PyArrayObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addMeshVertexNormals", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 78, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshVertexNormals", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 82, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addMeshVertexNormals", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 78, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normals), __pyx_ptype_5numpy_ndarray, 1, "normals", 0))) __PYX_ERR(0, 78, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_10addMeshVertexNormals(__pyx_self, __pyx_v_name, __pyx_v_n, __pyx_v_normals); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 82, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normals), __pyx_ptype_5numpy_ndarray, 1, "normals", 0))) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_12addMeshVertexNormals(__pyx_self, __pyx_v_name, __pyx_v_n, __pyx_v_normals); /* function exit code */ goto __pyx_L0; @@ -2361,7 +2612,7 @@ static PyObject *__pyx_pw_3gvt_11addMeshVertexNormals(PyObject *__pyx_self, PyOb return __pyx_r; } -static PyObject *__pyx_pf_3gvt_10addMeshVertexNormals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_normals) { +static PyObject *__pyx_pf_3gvt_12addMeshVertexNormals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_n, PyArrayObject *__pyx_v_normals) { __Pyx_LocalBuf_ND __pyx_pybuffernd_normals; __Pyx_Buffer __pyx_pybuffer_normals; PyObject *__pyx_r = NULL; @@ -2377,18 +2628,18 @@ static PyObject *__pyx_pf_3gvt_10addMeshVertexNormals(CYTHON_UNUSED PyObject *__ __pyx_pybuffernd_normals.rcbuffer = &__pyx_pybuffer_normals; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normals.rcbuffer->pybuffer, (PyObject*)__pyx_v_normals, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 78, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normals.rcbuffer->pybuffer, (PyObject*)__pyx_v_normals, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 82, __pyx_L1_error) } __pyx_pybuffernd_normals.diminfo[0].strides = __pyx_pybuffernd_normals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normals.diminfo[0].shape = __pyx_pybuffernd_normals.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":79 + /* "gvt.pyx":83 * * def addMeshVertexNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): * _addMeshVertexNormals(name.encode(),n, normals.data) # <<<<<<<<<<<<<< * * def finishMesh( str name, bool compute_normal = True): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2401,18 +2652,18 @@ static PyObject *__pyx_pf_3gvt_10addMeshVertexNormals(CYTHON_UNUSED PyObject *__ } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addMeshVertexNormals(__pyx_t_4, __pyx_v_n, ((float *)__pyx_v_normals->data)); - /* "gvt.pyx":78 + /* "gvt.pyx":82 * _addMeshFaceNormals(name.encode(), n, normals.data) * * def addMeshVertexNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): # <<<<<<<<<<<<<< @@ -2444,7 +2695,7 @@ static PyObject *__pyx_pf_3gvt_10addMeshVertexNormals(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "gvt.pyx":81 +/* "gvt.pyx":85 * _addMeshVertexNormals(name.encode(),n, normals.data) * * def finishMesh( str name, bool compute_normal = True): # <<<<<<<<<<<<<< @@ -2453,9 +2704,9 @@ static PyObject *__pyx_pf_3gvt_10addMeshVertexNormals(CYTHON_UNUSED PyObject *__ */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_13finishMesh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_13finishMesh = {"finishMesh", (PyCFunction)__pyx_pw_3gvt_13finishMesh, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_13finishMesh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_15finishMesh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_15finishMesh = {"finishMesh", (PyCFunction)__pyx_pw_3gvt_15finishMesh, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_15finishMesh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; bool __pyx_v_compute_normal; PyObject *__pyx_r = 0; @@ -2469,7 +2720,9 @@ static PyObject *__pyx_pw_3gvt_13finishMesh(PyObject *__pyx_self, PyObject *__py const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -2478,6 +2731,7 @@ static PyObject *__pyx_pw_3gvt_13finishMesh(PyObject *__pyx_self, PyObject *__py case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_normal); @@ -2485,11 +2739,12 @@ static PyObject *__pyx_pw_3gvt_13finishMesh(PyObject *__pyx_self, PyObject *__py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "finishMesh") < 0)) __PYX_ERR(0, 81, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "finishMesh") < 0)) __PYX_ERR(0, 85, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; @@ -2497,21 +2752,21 @@ static PyObject *__pyx_pw_3gvt_13finishMesh(PyObject *__pyx_self, PyObject *__py } __pyx_v_name = ((PyObject*)values[0]); if (values[1]) { - __pyx_v_compute_normal = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_compute_normal == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L3_error) + __pyx_v_compute_normal = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_compute_normal == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L3_error) } else { __pyx_v_compute_normal = ((bool)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("finishMesh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 81, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("finishMesh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 85, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.finishMesh", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 81, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_12finishMesh(__pyx_self, __pyx_v_name, __pyx_v_compute_normal); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_14finishMesh(__pyx_self, __pyx_v_name, __pyx_v_compute_normal); /* function exit code */ goto __pyx_L0; @@ -2522,7 +2777,7 @@ static PyObject *__pyx_pw_3gvt_13finishMesh(PyObject *__pyx_self, PyObject *__py return __pyx_r; } -static PyObject *__pyx_pf_3gvt_12finishMesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, bool __pyx_v_compute_normal) { +static PyObject *__pyx_pf_3gvt_14finishMesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, bool __pyx_v_compute_normal) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -2531,14 +2786,14 @@ static PyObject *__pyx_pf_3gvt_12finishMesh(CYTHON_UNUSED PyObject *__pyx_self, std::string __pyx_t_4; __Pyx_RefNannySetupContext("finishMesh", 0); - /* "gvt.pyx":82 + /* "gvt.pyx":86 * * def finishMesh( str name, bool compute_normal = True): * _finishMesh(name.encode(),compute_normal) # <<<<<<<<<<<<<< * * def addMeshMaterialLambert( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, float alpha): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2551,18 +2806,18 @@ static PyObject *__pyx_pf_3gvt_12finishMesh(CYTHON_UNUSED PyObject *__pyx_self, } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; finishMesh(__pyx_t_4, __pyx_v_compute_normal); - /* "gvt.pyx":81 + /* "gvt.pyx":85 * _addMeshVertexNormals(name.encode(),n, normals.data) * * def finishMesh( str name, bool compute_normal = True): # <<<<<<<<<<<<<< @@ -2585,7 +2840,7 @@ static PyObject *__pyx_pf_3gvt_12finishMesh(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "gvt.pyx":84 +/* "gvt.pyx":88 * _finishMesh(name.encode(),compute_normal) * * def addMeshMaterialLambert( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, float alpha): # <<<<<<<<<<<<<< @@ -2594,9 +2849,9 @@ static PyObject *__pyx_pf_3gvt_12finishMesh(CYTHON_UNUSED PyObject *__pyx_self, */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_15addMeshMaterialLambert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_15addMeshMaterialLambert = {"addMeshMaterialLambert", (PyCFunction)__pyx_pw_3gvt_15addMeshMaterialLambert, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_15addMeshMaterialLambert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_17addMeshMaterialLambert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_17addMeshMaterialLambert = {"addMeshMaterialLambert", (PyCFunction)__pyx_pw_3gvt_17addMeshMaterialLambert, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_17addMeshMaterialLambert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; unsigned int __pyx_v_mattype; PyArrayObject *__pyx_v_kd = 0; @@ -2612,9 +2867,13 @@ static PyObject *__pyx_pw_3gvt_15addMeshMaterialLambert(PyObject *__pyx_self, Py const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -2623,24 +2882,27 @@ static PyObject *__pyx_pw_3gvt_15addMeshMaterialLambert(PyObject *__pyx_self, Py case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mattype)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshMaterialLambert", 1, 4, 4, 1); __PYX_ERR(0, 84, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshMaterialLambert", 1, 4, 4, 1); __PYX_ERR(0, 88, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kd)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshMaterialLambert", 1, 4, 4, 2); __PYX_ERR(0, 84, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshMaterialLambert", 1, 4, 4, 2); __PYX_ERR(0, 88, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshMaterialLambert", 1, 4, 4, 3); __PYX_ERR(0, 84, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshMaterialLambert", 1, 4, 4, 3); __PYX_ERR(0, 88, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshMaterialLambert") < 0)) __PYX_ERR(0, 84, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshMaterialLambert") < 0)) __PYX_ERR(0, 88, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -2651,21 +2913,21 @@ static PyObject *__pyx_pw_3gvt_15addMeshMaterialLambert(PyObject *__pyx_self, Py values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_name = ((PyObject*)values[0]); - __pyx_v_mattype = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_mattype == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L3_error) + __pyx_v_mattype = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_mattype == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L3_error) __pyx_v_kd = ((PyArrayObject *)values[2]); - __pyx_v_alpha = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_alpha == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L3_error) + __pyx_v_alpha = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_alpha == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addMeshMaterialLambert", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 84, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshMaterialLambert", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 88, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addMeshMaterialLambert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 84, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kd), __pyx_ptype_5numpy_ndarray, 1, "kd", 0))) __PYX_ERR(0, 84, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_14addMeshMaterialLambert(__pyx_self, __pyx_v_name, __pyx_v_mattype, __pyx_v_kd, __pyx_v_alpha); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 88, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kd), __pyx_ptype_5numpy_ndarray, 1, "kd", 0))) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_16addMeshMaterialLambert(__pyx_self, __pyx_v_name, __pyx_v_mattype, __pyx_v_kd, __pyx_v_alpha); /* function exit code */ goto __pyx_L0; @@ -2676,7 +2938,7 @@ static PyObject *__pyx_pw_3gvt_15addMeshMaterialLambert(PyObject *__pyx_self, Py return __pyx_r; } -static PyObject *__pyx_pf_3gvt_14addMeshMaterialLambert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_mattype, PyArrayObject *__pyx_v_kd, float __pyx_v_alpha) { +static PyObject *__pyx_pf_3gvt_16addMeshMaterialLambert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_mattype, PyArrayObject *__pyx_v_kd, float __pyx_v_alpha) { __Pyx_LocalBuf_ND __pyx_pybuffernd_kd; __Pyx_Buffer __pyx_pybuffer_kd; PyObject *__pyx_r = NULL; @@ -2692,18 +2954,18 @@ static PyObject *__pyx_pf_3gvt_14addMeshMaterialLambert(CYTHON_UNUSED PyObject * __pyx_pybuffernd_kd.rcbuffer = &__pyx_pybuffer_kd; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_kd.rcbuffer->pybuffer, (PyObject*)__pyx_v_kd, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 84, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_kd.rcbuffer->pybuffer, (PyObject*)__pyx_v_kd, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 88, __pyx_L1_error) } __pyx_pybuffernd_kd.diminfo[0].strides = __pyx_pybuffernd_kd.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_kd.diminfo[0].shape = __pyx_pybuffernd_kd.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":85 + /* "gvt.pyx":89 * * def addMeshMaterialLambert( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, float alpha): * _addMeshMaterial(name.encode() ,mattype, kd.data, alpha) # <<<<<<<<<<<<<< * * def addMeshMaterialSpecular( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, np.ndarray[float, ndim=1, mode="c"] ks, float alpha ): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2716,18 +2978,18 @@ static PyObject *__pyx_pf_3gvt_14addMeshMaterialLambert(CYTHON_UNUSED PyObject * } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addMeshMaterial(__pyx_t_4, __pyx_v_mattype, ((float *)__pyx_v_kd->data), __pyx_v_alpha); - /* "gvt.pyx":84 + /* "gvt.pyx":88 * _finishMesh(name.encode(),compute_normal) * * def addMeshMaterialLambert( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, float alpha): # <<<<<<<<<<<<<< @@ -2759,7 +3021,7 @@ static PyObject *__pyx_pf_3gvt_14addMeshMaterialLambert(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "gvt.pyx":87 +/* "gvt.pyx":91 * _addMeshMaterial(name.encode() ,mattype, kd.data, alpha) * * def addMeshMaterialSpecular( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, np.ndarray[float, ndim=1, mode="c"] ks, float alpha ): # <<<<<<<<<<<<<< @@ -2768,9 +3030,9 @@ static PyObject *__pyx_pf_3gvt_14addMeshMaterialLambert(CYTHON_UNUSED PyObject * */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_17addMeshMaterialSpecular(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_17addMeshMaterialSpecular = {"addMeshMaterialSpecular", (PyCFunction)__pyx_pw_3gvt_17addMeshMaterialSpecular, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_17addMeshMaterialSpecular(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_19addMeshMaterialSpecular(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_19addMeshMaterialSpecular = {"addMeshMaterialSpecular", (PyCFunction)__pyx_pw_3gvt_19addMeshMaterialSpecular, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_19addMeshMaterialSpecular(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; unsigned int __pyx_v_mattype; PyArrayObject *__pyx_v_kd = 0; @@ -2787,10 +3049,15 @@ static PyObject *__pyx_pw_3gvt_17addMeshMaterialSpecular(PyObject *__pyx_self, P const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -2799,29 +3066,33 @@ static PyObject *__pyx_pw_3gvt_17addMeshMaterialSpecular(PyObject *__pyx_self, P case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mattype)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshMaterialSpecular", 1, 5, 5, 1); __PYX_ERR(0, 87, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshMaterialSpecular", 1, 5, 5, 1); __PYX_ERR(0, 91, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kd)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshMaterialSpecular", 1, 5, 5, 2); __PYX_ERR(0, 87, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshMaterialSpecular", 1, 5, 5, 2); __PYX_ERR(0, 91, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ks)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshMaterialSpecular", 1, 5, 5, 3); __PYX_ERR(0, 87, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshMaterialSpecular", 1, 5, 5, 3); __PYX_ERR(0, 91, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addMeshMaterialSpecular", 1, 5, 5, 4); __PYX_ERR(0, 87, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshMaterialSpecular", 1, 5, 5, 4); __PYX_ERR(0, 91, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshMaterialSpecular") < 0)) __PYX_ERR(0, 87, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addMeshMaterialSpecular") < 0)) __PYX_ERR(0, 91, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; @@ -2833,23 +3104,23 @@ static PyObject *__pyx_pw_3gvt_17addMeshMaterialSpecular(PyObject *__pyx_self, P values[4] = PyTuple_GET_ITEM(__pyx_args, 4); } __pyx_v_name = ((PyObject*)values[0]); - __pyx_v_mattype = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_mattype == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L3_error) + __pyx_v_mattype = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_mattype == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L3_error) __pyx_v_kd = ((PyArrayObject *)values[2]); __pyx_v_ks = ((PyArrayObject *)values[3]); - __pyx_v_alpha = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_alpha == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L3_error) + __pyx_v_alpha = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_alpha == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addMeshMaterialSpecular", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 87, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addMeshMaterialSpecular", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 91, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addMeshMaterialSpecular", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 87, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kd), __pyx_ptype_5numpy_ndarray, 1, "kd", 0))) __PYX_ERR(0, 87, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ks), __pyx_ptype_5numpy_ndarray, 1, "ks", 0))) __PYX_ERR(0, 87, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_16addMeshMaterialSpecular(__pyx_self, __pyx_v_name, __pyx_v_mattype, __pyx_v_kd, __pyx_v_ks, __pyx_v_alpha); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 91, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kd), __pyx_ptype_5numpy_ndarray, 1, "kd", 0))) __PYX_ERR(0, 91, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ks), __pyx_ptype_5numpy_ndarray, 1, "ks", 0))) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_18addMeshMaterialSpecular(__pyx_self, __pyx_v_name, __pyx_v_mattype, __pyx_v_kd, __pyx_v_ks, __pyx_v_alpha); /* function exit code */ goto __pyx_L0; @@ -2860,7 +3131,7 @@ static PyObject *__pyx_pw_3gvt_17addMeshMaterialSpecular(PyObject *__pyx_self, P return __pyx_r; } -static PyObject *__pyx_pf_3gvt_16addMeshMaterialSpecular(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_mattype, PyArrayObject *__pyx_v_kd, PyArrayObject *__pyx_v_ks, float __pyx_v_alpha) { +static PyObject *__pyx_pf_3gvt_18addMeshMaterialSpecular(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, unsigned int __pyx_v_mattype, PyArrayObject *__pyx_v_kd, PyArrayObject *__pyx_v_ks, float __pyx_v_alpha) { __Pyx_LocalBuf_ND __pyx_pybuffernd_kd; __Pyx_Buffer __pyx_pybuffer_kd; __Pyx_LocalBuf_ND __pyx_pybuffernd_ks; @@ -2882,23 +3153,23 @@ static PyObject *__pyx_pf_3gvt_16addMeshMaterialSpecular(CYTHON_UNUSED PyObject __pyx_pybuffernd_ks.rcbuffer = &__pyx_pybuffer_ks; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_kd.rcbuffer->pybuffer, (PyObject*)__pyx_v_kd, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 87, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_kd.rcbuffer->pybuffer, (PyObject*)__pyx_v_kd, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 91, __pyx_L1_error) } __pyx_pybuffernd_kd.diminfo[0].strides = __pyx_pybuffernd_kd.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_kd.diminfo[0].shape = __pyx_pybuffernd_kd.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ks, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 87, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ks, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 91, __pyx_L1_error) } __pyx_pybuffernd_ks.diminfo[0].strides = __pyx_pybuffernd_ks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ks.diminfo[0].shape = __pyx_pybuffernd_ks.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":88 + /* "gvt.pyx":92 * * def addMeshMaterialSpecular( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, np.ndarray[float, ndim=1, mode="c"] ks, float alpha ): * _addMeshMaterial2(name.encode(), mattype, kd.data, ks.data, alpha) # <<<<<<<<<<<<<< * * # def addMeshMaterials( str name, unsigned n, np.ndarray[uint32, ndim=1, mode="c"] mattype, np.ndarray[float, ndim=1, mode="c"] kd, np.ndarray[float, ndim=1, mode="c"] ks, np.ndarray[float, ndim=1, mode="c"] alpha): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2911,18 +3182,18 @@ static PyObject *__pyx_pf_3gvt_16addMeshMaterialSpecular(CYTHON_UNUSED PyObject } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addMeshMaterial(__pyx_t_4, __pyx_v_mattype, ((float *)__pyx_v_kd->data), ((float *)__pyx_v_ks->data), __pyx_v_alpha); - /* "gvt.pyx":87 + /* "gvt.pyx":91 * _addMeshMaterial(name.encode() ,mattype, kd.data, alpha) * * def addMeshMaterialSpecular( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, np.ndarray[float, ndim=1, mode="c"] ks, float alpha ): # <<<<<<<<<<<<<< @@ -2956,7 +3227,7 @@ static PyObject *__pyx_pf_3gvt_16addMeshMaterialSpecular(CYTHON_UNUSED PyObject return __pyx_r; } -/* "gvt.pyx":93 +/* "gvt.pyx":97 * # _addMeshMaterials(name.encode(),n, mattype.data, kd.data, ks.float, alpha.data) * * def addInstance(str name, np.ndarray[float, ndim=1, mode="c"] m): # <<<<<<<<<<<<<< @@ -2965,9 +3236,9 @@ static PyObject *__pyx_pf_3gvt_16addMeshMaterialSpecular(CYTHON_UNUSED PyObject */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_19addInstance(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_19addInstance = {"addInstance", (PyCFunction)__pyx_pw_3gvt_19addInstance, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_19addInstance(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_21addInstance(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_21addInstance = {"addInstance", (PyCFunction)__pyx_pw_3gvt_21addInstance, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_21addInstance(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyArrayObject *__pyx_v_m = 0; PyObject *__pyx_r = 0; @@ -2981,7 +3252,9 @@ static PyObject *__pyx_pw_3gvt_19addInstance(PyObject *__pyx_self, PyObject *__p const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -2990,14 +3263,15 @@ static PyObject *__pyx_pw_3gvt_19addInstance(PyObject *__pyx_self, PyObject *__p case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addInstance", 1, 2, 2, 1); __PYX_ERR(0, 93, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addInstance", 1, 2, 2, 1); __PYX_ERR(0, 97, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addInstance") < 0)) __PYX_ERR(0, 93, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addInstance") < 0)) __PYX_ERR(0, 97, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3010,15 +3284,15 @@ static PyObject *__pyx_pw_3gvt_19addInstance(PyObject *__pyx_self, PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addInstance", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 93, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addInstance", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 97, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addInstance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 93, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 93, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_18addInstance(__pyx_self, __pyx_v_name, __pyx_v_m); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_5numpy_ndarray, 1, "m", 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_20addInstance(__pyx_self, __pyx_v_name, __pyx_v_m); /* function exit code */ goto __pyx_L0; @@ -3029,7 +3303,7 @@ static PyObject *__pyx_pw_3gvt_19addInstance(PyObject *__pyx_self, PyObject *__p return __pyx_r; } -static PyObject *__pyx_pf_3gvt_18addInstance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_m) { +static PyObject *__pyx_pf_3gvt_20addInstance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_m) { __Pyx_LocalBuf_ND __pyx_pybuffernd_m; __Pyx_Buffer __pyx_pybuffer_m; PyObject *__pyx_r = NULL; @@ -3045,18 +3319,18 @@ static PyObject *__pyx_pf_3gvt_18addInstance(CYTHON_UNUSED PyObject *__pyx_self, __pyx_pybuffernd_m.rcbuffer = &__pyx_pybuffer_m; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m.rcbuffer->pybuffer, (PyObject*)__pyx_v_m, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 93, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m.rcbuffer->pybuffer, (PyObject*)__pyx_v_m, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 97, __pyx_L1_error) } __pyx_pybuffernd_m.diminfo[0].strides = __pyx_pybuffernd_m.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m.diminfo[0].shape = __pyx_pybuffernd_m.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":94 + /* "gvt.pyx":98 * * def addInstance(str name, np.ndarray[float, ndim=1, mode="c"] m): * _addInstance(name.encode(), m.data) # <<<<<<<<<<<<<< * * def addPointLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -3069,18 +3343,18 @@ static PyObject *__pyx_pf_3gvt_18addInstance(CYTHON_UNUSED PyObject *__pyx_self, } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addInstance(__pyx_t_4, ((float *)__pyx_v_m->data)); - /* "gvt.pyx":93 + /* "gvt.pyx":97 * # _addMeshMaterials(name.encode(),n, mattype.data, kd.data, ks.float, alpha.data) * * def addInstance(str name, np.ndarray[float, ndim=1, mode="c"] m): # <<<<<<<<<<<<<< @@ -3112,7 +3386,7 @@ static PyObject *__pyx_pf_3gvt_18addInstance(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "gvt.pyx":96 +/* "gvt.pyx":100 * _addInstance(name.encode(), m.data) * * def addPointLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): # <<<<<<<<<<<<<< @@ -3121,9 +3395,9 @@ static PyObject *__pyx_pf_3gvt_18addInstance(CYTHON_UNUSED PyObject *__pyx_self, */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_21addPointLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_21addPointLight = {"addPointLight", (PyCFunction)__pyx_pw_3gvt_21addPointLight, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_21addPointLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_23addPointLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_23addPointLight = {"addPointLight", (PyCFunction)__pyx_pw_3gvt_23addPointLight, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_23addPointLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyArrayObject *__pyx_v_pos = 0; PyArrayObject *__pyx_v_color = 0; @@ -3138,8 +3412,11 @@ static PyObject *__pyx_pw_3gvt_21addPointLight(PyObject *__pyx_self, PyObject *_ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -3148,19 +3425,21 @@ static PyObject *__pyx_pw_3gvt_21addPointLight(PyObject *__pyx_self, PyObject *_ case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addPointLight", 1, 3, 3, 1); __PYX_ERR(0, 96, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addPointLight", 1, 3, 3, 1); __PYX_ERR(0, 100, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_color)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addPointLight", 1, 3, 3, 2); __PYX_ERR(0, 96, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addPointLight", 1, 3, 3, 2); __PYX_ERR(0, 100, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addPointLight") < 0)) __PYX_ERR(0, 96, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addPointLight") < 0)) __PYX_ERR(0, 100, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -3175,16 +3454,16 @@ static PyObject *__pyx_pw_3gvt_21addPointLight(PyObject *__pyx_self, PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addPointLight", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 96, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addPointLight", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 100, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addPointLight", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 96, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 96, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_color), __pyx_ptype_5numpy_ndarray, 1, "color", 0))) __PYX_ERR(0, 96, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_20addPointLight(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_color); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 100, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 100, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_color), __pyx_ptype_5numpy_ndarray, 1, "color", 0))) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_22addPointLight(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_color); /* function exit code */ goto __pyx_L0; @@ -3195,7 +3474,7 @@ static PyObject *__pyx_pw_3gvt_21addPointLight(PyObject *__pyx_self, PyObject *_ return __pyx_r; } -static PyObject *__pyx_pf_3gvt_20addPointLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color) { +static PyObject *__pyx_pf_3gvt_22addPointLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color) { __Pyx_LocalBuf_ND __pyx_pybuffernd_color; __Pyx_Buffer __pyx_pybuffer_color; __Pyx_LocalBuf_ND __pyx_pybuffernd_pos; @@ -3217,23 +3496,23 @@ static PyObject *__pyx_pf_3gvt_20addPointLight(CYTHON_UNUSED PyObject *__pyx_sel __pyx_pybuffernd_color.rcbuffer = &__pyx_pybuffer_color; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 96, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 100, __pyx_L1_error) } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_color.rcbuffer->pybuffer, (PyObject*)__pyx_v_color, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 96, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_color.rcbuffer->pybuffer, (PyObject*)__pyx_v_color, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 100, __pyx_L1_error) } __pyx_pybuffernd_color.diminfo[0].strides = __pyx_pybuffernd_color.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_color.diminfo[0].shape = __pyx_pybuffernd_color.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":97 + /* "gvt.pyx":101 * * def addPointLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): * _addPointLight(name.encode(), pos.data, color.data) # <<<<<<<<<<<<<< * * def addAreaLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -3246,18 +3525,18 @@ static PyObject *__pyx_pf_3gvt_20addPointLight(CYTHON_UNUSED PyObject *__pyx_sel } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addPointLight(__pyx_t_4, ((float *)__pyx_v_pos->data), ((float *)__pyx_v_color->data)); - /* "gvt.pyx":96 + /* "gvt.pyx":100 * _addInstance(name.encode(), m.data) * * def addPointLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): # <<<<<<<<<<<<<< @@ -3291,7 +3570,7 @@ static PyObject *__pyx_pf_3gvt_20addPointLight(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "gvt.pyx":99 +/* "gvt.pyx":103 * _addPointLight(name.encode(), pos.data, color.data) * * def addAreaLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): # <<<<<<<<<<<<<< @@ -3300,9 +3579,9 @@ static PyObject *__pyx_pf_3gvt_20addPointLight(CYTHON_UNUSED PyObject *__pyx_sel */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_23addAreaLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_23addAreaLight = {"addAreaLight", (PyCFunction)__pyx_pw_3gvt_23addAreaLight, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_23addAreaLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_25addAreaLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_25addAreaLight = {"addAreaLight", (PyCFunction)__pyx_pw_3gvt_25addAreaLight, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_25addAreaLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyArrayObject *__pyx_v_pos = 0; PyArrayObject *__pyx_v_color = 0; @@ -3320,11 +3599,17 @@ static PyObject *__pyx_pw_3gvt_23addAreaLight(PyObject *__pyx_self, PyObject *__ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -3333,34 +3618,39 @@ static PyObject *__pyx_pw_3gvt_23addAreaLight(PyObject *__pyx_self, PyObject *__ case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, 1); __PYX_ERR(0, 99, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, 1); __PYX_ERR(0, 103, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_color)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, 2); __PYX_ERR(0, 99, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, 2); __PYX_ERR(0, 103, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, 3); __PYX_ERR(0, 99, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, 3); __PYX_ERR(0, 103, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, 4); __PYX_ERR(0, 99, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, 4); __PYX_ERR(0, 103, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, 5); __PYX_ERR(0, 99, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, 5); __PYX_ERR(0, 103, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addAreaLight") < 0)) __PYX_ERR(0, 99, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addAreaLight") < 0)) __PYX_ERR(0, 103, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; @@ -3376,22 +3666,22 @@ static PyObject *__pyx_pw_3gvt_23addAreaLight(PyObject *__pyx_self, PyObject *__ __pyx_v_pos = ((PyArrayObject *)values[1]); __pyx_v_color = ((PyArrayObject *)values[2]); __pyx_v_n = ((PyArrayObject *)values[3]); - __pyx_v_w = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_w == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 99, __pyx_L3_error) - __pyx_v_h = __pyx_PyFloat_AsFloat(values[5]); if (unlikely((__pyx_v_h == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 99, __pyx_L3_error) + __pyx_v_w = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_w == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L3_error) + __pyx_v_h = __pyx_PyFloat_AsFloat(values[5]); if (unlikely((__pyx_v_h == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 99, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addAreaLight", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 103, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addAreaLight", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 99, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 99, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_color), __pyx_ptype_5numpy_ndarray, 1, "color", 0))) __PYX_ERR(0, 99, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 99, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_22addAreaLight(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_color, __pyx_v_n, __pyx_v_w, __pyx_v_h); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 103, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 103, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_color), __pyx_ptype_5numpy_ndarray, 1, "color", 0))) __PYX_ERR(0, 103, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_24addAreaLight(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_color, __pyx_v_n, __pyx_v_w, __pyx_v_h); /* function exit code */ goto __pyx_L0; @@ -3402,7 +3692,7 @@ static PyObject *__pyx_pw_3gvt_23addAreaLight(PyObject *__pyx_self, PyObject *__ return __pyx_r; } -static PyObject *__pyx_pf_3gvt_22addAreaLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color, PyArrayObject *__pyx_v_n, float __pyx_v_w, float __pyx_v_h) { +static PyObject *__pyx_pf_3gvt_24addAreaLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color, PyArrayObject *__pyx_v_n, float __pyx_v_w, float __pyx_v_h) { __Pyx_LocalBuf_ND __pyx_pybuffernd_color; __Pyx_Buffer __pyx_pybuffer_color; __Pyx_LocalBuf_ND __pyx_pybuffernd_n; @@ -3430,28 +3720,28 @@ static PyObject *__pyx_pf_3gvt_22addAreaLight(CYTHON_UNUSED PyObject *__pyx_self __pyx_pybuffernd_n.rcbuffer = &__pyx_pybuffer_n; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 99, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 103, __pyx_L1_error) } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_color.rcbuffer->pybuffer, (PyObject*)__pyx_v_color, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 99, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_color.rcbuffer->pybuffer, (PyObject*)__pyx_v_color, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 103, __pyx_L1_error) } __pyx_pybuffernd_color.diminfo[0].strides = __pyx_pybuffernd_color.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_color.diminfo[0].shape = __pyx_pybuffernd_color.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_n.rcbuffer->pybuffer, (PyObject*)__pyx_v_n, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 99, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_n.rcbuffer->pybuffer, (PyObject*)__pyx_v_n, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 103, __pyx_L1_error) } __pyx_pybuffernd_n.diminfo[0].strides = __pyx_pybuffernd_n.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_n.diminfo[0].shape = __pyx_pybuffernd_n.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":100 + /* "gvt.pyx":104 * * def addAreaLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): * _addAreaLight(name.encode(), pos.data, color.data, n.data, w, h) # <<<<<<<<<<<<<< * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -3464,18 +3754,18 @@ static PyObject *__pyx_pf_3gvt_22addAreaLight(CYTHON_UNUSED PyObject *__pyx_self } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addAreaLight(__pyx_t_4, ((float *)__pyx_v_pos->data), ((float *)__pyx_v_color->data), ((float *)__pyx_v_n->data), __pyx_v_w, __pyx_v_h); - /* "gvt.pyx":99 + /* "gvt.pyx":103 * _addPointLight(name.encode(), pos.data, color.data) * * def addAreaLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): # <<<<<<<<<<<<<< @@ -3511,7 +3801,7 @@ static PyObject *__pyx_pf_3gvt_22addAreaLight(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "gvt.pyx":102 +/* "gvt.pyx":106 * _addAreaLight(name.encode(), pos.data, color.data, n.data, w, h) * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): # <<<<<<<<<<<<<< @@ -3520,9 +3810,9 @@ static PyObject *__pyx_pf_3gvt_22addAreaLight(CYTHON_UNUSED PyObject *__pyx_self */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_25modifyLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_25modifyLight = {"modifyLight", (PyCFunction)__pyx_pw_3gvt_25modifyLight, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_25modifyLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_27modifyLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_27modifyLight = {"modifyLight", (PyCFunction)__pyx_pw_3gvt_27modifyLight, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_27modifyLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyArrayObject *__pyx_v_pos = 0; PyArrayObject *__pyx_v_color = 0; @@ -3537,8 +3827,11 @@ static PyObject *__pyx_pw_3gvt_25modifyLight(PyObject *__pyx_self, PyObject *__p const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -3547,19 +3840,21 @@ static PyObject *__pyx_pw_3gvt_25modifyLight(PyObject *__pyx_self, PyObject *__p case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 3, 3, 1); __PYX_ERR(0, 102, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 3, 3, 1); __PYX_ERR(0, 106, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_color)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 3, 3, 2); __PYX_ERR(0, 102, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 3, 3, 2); __PYX_ERR(0, 106, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modifyLight") < 0)) __PYX_ERR(0, 102, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modifyLight") < 0)) __PYX_ERR(0, 106, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -3574,16 +3869,16 @@ static PyObject *__pyx_pw_3gvt_25modifyLight(PyObject *__pyx_self, PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 102, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 106, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.modifyLight", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 102, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 102, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_color), __pyx_ptype_5numpy_ndarray, 1, "color", 0))) __PYX_ERR(0, 102, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_24modifyLight(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_color); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 106, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 106, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_color), __pyx_ptype_5numpy_ndarray, 1, "color", 0))) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_26modifyLight(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_color); /* function exit code */ goto __pyx_L0; @@ -3594,7 +3889,7 @@ static PyObject *__pyx_pw_3gvt_25modifyLight(PyObject *__pyx_self, PyObject *__p return __pyx_r; } -static PyObject *__pyx_pf_3gvt_24modifyLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color) { +static PyObject *__pyx_pf_3gvt_26modifyLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color) { __Pyx_LocalBuf_ND __pyx_pybuffernd_color; __Pyx_Buffer __pyx_pybuffer_color; __Pyx_LocalBuf_ND __pyx_pybuffernd_pos; @@ -3616,23 +3911,23 @@ static PyObject *__pyx_pf_3gvt_24modifyLight(CYTHON_UNUSED PyObject *__pyx_self, __pyx_pybuffernd_color.rcbuffer = &__pyx_pybuffer_color; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 102, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_color.rcbuffer->pybuffer, (PyObject*)__pyx_v_color, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 102, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_color.rcbuffer->pybuffer, (PyObject*)__pyx_v_color, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) } __pyx_pybuffernd_color.diminfo[0].strides = __pyx_pybuffernd_color.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_color.diminfo[0].shape = __pyx_pybuffernd_color.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":103 + /* "gvt.pyx":107 * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): * _modifyLight(name.encode(),pos.data, color.data) # <<<<<<<<<<<<<< * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -3645,18 +3940,18 @@ static PyObject *__pyx_pf_3gvt_24modifyLight(CYTHON_UNUSED PyObject *__pyx_self, } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; modifyLight(__pyx_t_4, ((float *)__pyx_v_pos->data), ((float *)__pyx_v_color->data)); - /* "gvt.pyx":102 + /* "gvt.pyx":106 * _addAreaLight(name.encode(), pos.data, color.data, n.data, w, h) * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): # <<<<<<<<<<<<<< @@ -3690,7 +3985,7 @@ static PyObject *__pyx_pf_3gvt_24modifyLight(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "gvt.pyx":105 +/* "gvt.pyx":109 * _modifyLight(name.encode(),pos.data, color.data) * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): # <<<<<<<<<<<<<< @@ -3699,9 +3994,9 @@ static PyObject *__pyx_pf_3gvt_24modifyLight(CYTHON_UNUSED PyObject *__pyx_self, */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_27modifyLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_27modifyLight = {"modifyLight", (PyCFunction)__pyx_pw_3gvt_27modifyLight, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_27modifyLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_29modifyLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_29modifyLight = {"modifyLight", (PyCFunction)__pyx_pw_3gvt_29modifyLight, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_29modifyLight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyArrayObject *__pyx_v_pos = 0; PyArrayObject *__pyx_v_color = 0; @@ -3719,11 +4014,17 @@ static PyObject *__pyx_pw_3gvt_27modifyLight(PyObject *__pyx_self, PyObject *__p const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -3732,34 +4033,39 @@ static PyObject *__pyx_pw_3gvt_27modifyLight(PyObject *__pyx_self, PyObject *__p case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, 1); __PYX_ERR(0, 105, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, 1); __PYX_ERR(0, 109, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_color)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, 2); __PYX_ERR(0, 105, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, 2); __PYX_ERR(0, 109, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, 3); __PYX_ERR(0, 105, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, 3); __PYX_ERR(0, 109, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, 4); __PYX_ERR(0, 105, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, 4); __PYX_ERR(0, 109, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, 5); __PYX_ERR(0, 105, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, 5); __PYX_ERR(0, 109, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modifyLight") < 0)) __PYX_ERR(0, 105, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modifyLight") < 0)) __PYX_ERR(0, 109, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; @@ -3775,22 +4081,22 @@ static PyObject *__pyx_pw_3gvt_27modifyLight(PyObject *__pyx_self, PyObject *__p __pyx_v_pos = ((PyArrayObject *)values[1]); __pyx_v_color = ((PyArrayObject *)values[2]); __pyx_v_n = ((PyArrayObject *)values[3]); - __pyx_v_w = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_w == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L3_error) - __pyx_v_h = __pyx_PyFloat_AsFloat(values[5]); if (unlikely((__pyx_v_h == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L3_error) + __pyx_v_w = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_w == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L3_error) + __pyx_v_h = __pyx_PyFloat_AsFloat(values[5]); if (unlikely((__pyx_v_h == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 105, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyLight", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 109, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.modifyLight", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 105, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 105, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_color), __pyx_ptype_5numpy_ndarray, 1, "color", 0))) __PYX_ERR(0, 105, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 105, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_26modifyLight(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_color, __pyx_v_n, __pyx_v_w, __pyx_v_h); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 109, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 109, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_color), __pyx_ptype_5numpy_ndarray, 1, "color", 0))) __PYX_ERR(0, 109, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_5numpy_ndarray, 1, "n", 0))) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_28modifyLight(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_color, __pyx_v_n, __pyx_v_w, __pyx_v_h); /* function exit code */ goto __pyx_L0; @@ -3801,7 +4107,7 @@ static PyObject *__pyx_pw_3gvt_27modifyLight(PyObject *__pyx_self, PyObject *__p return __pyx_r; } -static PyObject *__pyx_pf_3gvt_26modifyLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color, PyArrayObject *__pyx_v_n, float __pyx_v_w, float __pyx_v_h) { +static PyObject *__pyx_pf_3gvt_28modifyLight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_color, PyArrayObject *__pyx_v_n, float __pyx_v_w, float __pyx_v_h) { __Pyx_LocalBuf_ND __pyx_pybuffernd_color; __Pyx_Buffer __pyx_pybuffer_color; __Pyx_LocalBuf_ND __pyx_pybuffernd_n; @@ -3829,28 +4135,28 @@ static PyObject *__pyx_pf_3gvt_26modifyLight(CYTHON_UNUSED PyObject *__pyx_self, __pyx_pybuffernd_n.rcbuffer = &__pyx_pybuffer_n; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 105, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 109, __pyx_L1_error) } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_color.rcbuffer->pybuffer, (PyObject*)__pyx_v_color, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 105, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_color.rcbuffer->pybuffer, (PyObject*)__pyx_v_color, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 109, __pyx_L1_error) } __pyx_pybuffernd_color.diminfo[0].strides = __pyx_pybuffernd_color.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_color.diminfo[0].shape = __pyx_pybuffernd_color.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_n.rcbuffer->pybuffer, (PyObject*)__pyx_v_n, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 105, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_n.rcbuffer->pybuffer, (PyObject*)__pyx_v_n, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 109, __pyx_L1_error) } __pyx_pybuffernd_n.diminfo[0].strides = __pyx_pybuffernd_n.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_n.diminfo[0].shape = __pyx_pybuffernd_n.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":106 + /* "gvt.pyx":110 * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): * _modifyLight(name.encode(),pos.data,color.data,n.data,w,h) # <<<<<<<<<<<<<< * * def addCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov, int depth, int samples, float jitter): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -3863,18 +4169,18 @@ static PyObject *__pyx_pf_3gvt_26modifyLight(CYTHON_UNUSED PyObject *__pyx_self, } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; modifyLight(__pyx_t_4, ((float *)__pyx_v_pos->data), ((float *)__pyx_v_color->data), ((float *)__pyx_v_n->data), __pyx_v_w, __pyx_v_h); - /* "gvt.pyx":105 + /* "gvt.pyx":109 * _modifyLight(name.encode(),pos.data, color.data) * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): # <<<<<<<<<<<<<< @@ -3910,7 +4216,7 @@ static PyObject *__pyx_pf_3gvt_26modifyLight(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "gvt.pyx":108 +/* "gvt.pyx":112 * _modifyLight(name.encode(),pos.data,color.data,n.data,w,h) * * def addCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov, int depth, int samples, float jitter): # <<<<<<<<<<<<<< @@ -3919,9 +4225,9 @@ static PyObject *__pyx_pf_3gvt_26modifyLight(CYTHON_UNUSED PyObject *__pyx_self, */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_29addCamera(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_29addCamera = {"addCamera", (PyCFunction)__pyx_pw_3gvt_29addCamera, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_29addCamera(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_31addCamera(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_31addCamera = {"addCamera", (PyCFunction)__pyx_pw_3gvt_31addCamera, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_31addCamera(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyArrayObject *__pyx_v_pos = 0; PyArrayObject *__pyx_v_focus = 0; @@ -3941,13 +4247,21 @@ static PyObject *__pyx_pw_3gvt_29addCamera(PyObject *__pyx_self, PyObject *__pyx const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); + CYTHON_FALLTHROUGH; case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -3956,44 +4270,51 @@ static PyObject *__pyx_pw_3gvt_29addCamera(PyObject *__pyx_self, PyObject *__pyx case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 1); __PYX_ERR(0, 108, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 1); __PYX_ERR(0, 112, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_focus)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 2); __PYX_ERR(0, 108, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 2); __PYX_ERR(0, 112, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_up)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 3); __PYX_ERR(0, 108, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 3); __PYX_ERR(0, 112, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fov)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 4); __PYX_ERR(0, 108, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 4); __PYX_ERR(0, 112, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_depth)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 5); __PYX_ERR(0, 108, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 5); __PYX_ERR(0, 112, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_samples)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 6); __PYX_ERR(0, 108, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 6); __PYX_ERR(0, 112, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_jitter)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 7); __PYX_ERR(0, 108, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, 7); __PYX_ERR(0, 112, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addCamera") < 0)) __PYX_ERR(0, 108, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addCamera") < 0)) __PYX_ERR(0, 112, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 8) { goto __pyx_L5_argtuple_error; @@ -4011,24 +4332,24 @@ static PyObject *__pyx_pw_3gvt_29addCamera(PyObject *__pyx_self, PyObject *__pyx __pyx_v_pos = ((PyArrayObject *)values[1]); __pyx_v_focus = ((PyArrayObject *)values[2]); __pyx_v_up = ((PyArrayObject *)values[3]); - __pyx_v_fov = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_fov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L3_error) - __pyx_v_depth = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_depth == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L3_error) - __pyx_v_samples = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_samples == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L3_error) - __pyx_v_jitter = __pyx_PyFloat_AsFloat(values[7]); if (unlikely((__pyx_v_jitter == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L3_error) + __pyx_v_fov = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_fov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + __pyx_v_depth = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_depth == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + __pyx_v_samples = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_samples == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + __pyx_v_jitter = __pyx_PyFloat_AsFloat(values[7]); if (unlikely((__pyx_v_jitter == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 108, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addCamera", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 112, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addCamera", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 108, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 108, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_focus), __pyx_ptype_5numpy_ndarray, 1, "focus", 0))) __PYX_ERR(0, 108, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_up), __pyx_ptype_5numpy_ndarray, 1, "up", 0))) __PYX_ERR(0, 108, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_28addCamera(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_focus, __pyx_v_up, __pyx_v_fov, __pyx_v_depth, __pyx_v_samples, __pyx_v_jitter); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_focus), __pyx_ptype_5numpy_ndarray, 1, "focus", 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_up), __pyx_ptype_5numpy_ndarray, 1, "up", 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_30addCamera(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_focus, __pyx_v_up, __pyx_v_fov, __pyx_v_depth, __pyx_v_samples, __pyx_v_jitter); /* function exit code */ goto __pyx_L0; @@ -4039,7 +4360,7 @@ static PyObject *__pyx_pw_3gvt_29addCamera(PyObject *__pyx_self, PyObject *__pyx return __pyx_r; } -static PyObject *__pyx_pf_3gvt_28addCamera(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_focus, PyArrayObject *__pyx_v_up, float __pyx_v_fov, int __pyx_v_depth, int __pyx_v_samples, float __pyx_v_jitter) { +static PyObject *__pyx_pf_3gvt_30addCamera(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_focus, PyArrayObject *__pyx_v_up, float __pyx_v_fov, int __pyx_v_depth, int __pyx_v_samples, float __pyx_v_jitter) { __Pyx_LocalBuf_ND __pyx_pybuffernd_focus; __Pyx_Buffer __pyx_pybuffer_focus; __Pyx_LocalBuf_ND __pyx_pybuffernd_pos; @@ -4067,28 +4388,28 @@ static PyObject *__pyx_pf_3gvt_28addCamera(CYTHON_UNUSED PyObject *__pyx_self, P __pyx_pybuffernd_up.rcbuffer = &__pyx_pybuffer_up; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 108, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 112, __pyx_L1_error) } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_focus.rcbuffer->pybuffer, (PyObject*)__pyx_v_focus, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 108, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_focus.rcbuffer->pybuffer, (PyObject*)__pyx_v_focus, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 112, __pyx_L1_error) } __pyx_pybuffernd_focus.diminfo[0].strides = __pyx_pybuffernd_focus.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_focus.diminfo[0].shape = __pyx_pybuffernd_focus.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_up.rcbuffer->pybuffer, (PyObject*)__pyx_v_up, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 108, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_up.rcbuffer->pybuffer, (PyObject*)__pyx_v_up, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 112, __pyx_L1_error) } __pyx_pybuffernd_up.diminfo[0].strides = __pyx_pybuffernd_up.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_up.diminfo[0].shape = __pyx_pybuffernd_up.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":109 + /* "gvt.pyx":113 * * def addCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov, int depth, int samples, float jitter): * _addCamera(name.encode(), pos.data, focus.data,up.data,fov,depth,samples,jitter) # <<<<<<<<<<<<<< * * def modifyCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4101,18 +4422,18 @@ static PyObject *__pyx_pf_3gvt_28addCamera(CYTHON_UNUSED PyObject *__pyx_self, P } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addCamera(__pyx_t_4, ((float *)__pyx_v_pos->data), ((float *)__pyx_v_focus->data), ((float *)__pyx_v_up->data), __pyx_v_fov, __pyx_v_depth, __pyx_v_samples, __pyx_v_jitter); - /* "gvt.pyx":108 + /* "gvt.pyx":112 * _modifyLight(name.encode(),pos.data,color.data,n.data,w,h) * * def addCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov, int depth, int samples, float jitter): # <<<<<<<<<<<<<< @@ -4148,7 +4469,7 @@ static PyObject *__pyx_pf_3gvt_28addCamera(CYTHON_UNUSED PyObject *__pyx_self, P return __pyx_r; } -/* "gvt.pyx":111 +/* "gvt.pyx":115 * _addCamera(name.encode(), pos.data, focus.data,up.data,fov,depth,samples,jitter) * * def modifyCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov): # <<<<<<<<<<<<<< @@ -4157,9 +4478,9 @@ static PyObject *__pyx_pf_3gvt_28addCamera(CYTHON_UNUSED PyObject *__pyx_self, P */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_31modifyCamera(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_31modifyCamera = {"modifyCamera", (PyCFunction)__pyx_pw_3gvt_31modifyCamera, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_31modifyCamera(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_33modifyCamera(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_33modifyCamera = {"modifyCamera", (PyCFunction)__pyx_pw_3gvt_33modifyCamera, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_33modifyCamera(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyArrayObject *__pyx_v_pos = 0; PyArrayObject *__pyx_v_focus = 0; @@ -4176,10 +4497,15 @@ static PyObject *__pyx_pw_3gvt_31modifyCamera(PyObject *__pyx_self, PyObject *__ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -4188,29 +4514,33 @@ static PyObject *__pyx_pw_3gvt_31modifyCamera(PyObject *__pyx_self, PyObject *__ case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyCamera", 1, 5, 5, 1); __PYX_ERR(0, 111, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyCamera", 1, 5, 5, 1); __PYX_ERR(0, 115, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_focus)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyCamera", 1, 5, 5, 2); __PYX_ERR(0, 111, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyCamera", 1, 5, 5, 2); __PYX_ERR(0, 115, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_up)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyCamera", 1, 5, 5, 3); __PYX_ERR(0, 111, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyCamera", 1, 5, 5, 3); __PYX_ERR(0, 115, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fov)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyCamera", 1, 5, 5, 4); __PYX_ERR(0, 111, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyCamera", 1, 5, 5, 4); __PYX_ERR(0, 115, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modifyCamera") < 0)) __PYX_ERR(0, 111, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modifyCamera") < 0)) __PYX_ERR(0, 115, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; @@ -4225,21 +4555,21 @@ static PyObject *__pyx_pw_3gvt_31modifyCamera(PyObject *__pyx_self, PyObject *__ __pyx_v_pos = ((PyArrayObject *)values[1]); __pyx_v_focus = ((PyArrayObject *)values[2]); __pyx_v_up = ((PyArrayObject *)values[3]); - __pyx_v_fov = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_fov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) + __pyx_v_fov = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_fov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("modifyCamera", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 111, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyCamera", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 115, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.modifyCamera", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 111, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 111, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_focus), __pyx_ptype_5numpy_ndarray, 1, "focus", 0))) __PYX_ERR(0, 111, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_up), __pyx_ptype_5numpy_ndarray, 1, "up", 0))) __PYX_ERR(0, 111, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_30modifyCamera(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_focus, __pyx_v_up, __pyx_v_fov); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 115, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 115, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_focus), __pyx_ptype_5numpy_ndarray, 1, "focus", 0))) __PYX_ERR(0, 115, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_up), __pyx_ptype_5numpy_ndarray, 1, "up", 0))) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_32modifyCamera(__pyx_self, __pyx_v_name, __pyx_v_pos, __pyx_v_focus, __pyx_v_up, __pyx_v_fov); /* function exit code */ goto __pyx_L0; @@ -4250,7 +4580,7 @@ static PyObject *__pyx_pw_3gvt_31modifyCamera(PyObject *__pyx_self, PyObject *__ return __pyx_r; } -static PyObject *__pyx_pf_3gvt_30modifyCamera(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_focus, PyArrayObject *__pyx_v_up, float __pyx_v_fov) { +static PyObject *__pyx_pf_3gvt_32modifyCamera(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyArrayObject *__pyx_v_pos, PyArrayObject *__pyx_v_focus, PyArrayObject *__pyx_v_up, float __pyx_v_fov) { __Pyx_LocalBuf_ND __pyx_pybuffernd_focus; __Pyx_Buffer __pyx_pybuffer_focus; __Pyx_LocalBuf_ND __pyx_pybuffernd_pos; @@ -4278,28 +4608,28 @@ static PyObject *__pyx_pf_3gvt_30modifyCamera(CYTHON_UNUSED PyObject *__pyx_self __pyx_pybuffernd_up.rcbuffer = &__pyx_pybuffer_up; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 111, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 115, __pyx_L1_error) } __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_focus.rcbuffer->pybuffer, (PyObject*)__pyx_v_focus, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 111, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_focus.rcbuffer->pybuffer, (PyObject*)__pyx_v_focus, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 115, __pyx_L1_error) } __pyx_pybuffernd_focus.diminfo[0].strides = __pyx_pybuffernd_focus.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_focus.diminfo[0].shape = __pyx_pybuffernd_focus.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_up.rcbuffer->pybuffer, (PyObject*)__pyx_v_up, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 111, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_up.rcbuffer->pybuffer, (PyObject*)__pyx_v_up, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 115, __pyx_L1_error) } __pyx_pybuffernd_up.diminfo[0].strides = __pyx_pybuffernd_up.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_up.diminfo[0].shape = __pyx_pybuffernd_up.rcbuffer->pybuffer.shape[0]; - /* "gvt.pyx":112 + /* "gvt.pyx":116 * * def modifyCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov): * _modifyCamera(name.encode(), pos.data, focus.data,up.data,fov) # <<<<<<<<<<<<<< * * def addFilm(str name, int w, int h, str path): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4312,18 +4642,18 @@ static PyObject *__pyx_pf_3gvt_30modifyCamera(CYTHON_UNUSED PyObject *__pyx_self } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; modifyCamera(__pyx_t_4, ((float *)__pyx_v_pos->data), ((float *)__pyx_v_focus->data), ((float *)__pyx_v_up->data), __pyx_v_fov); - /* "gvt.pyx":111 + /* "gvt.pyx":115 * _addCamera(name.encode(), pos.data, focus.data,up.data,fov,depth,samples,jitter) * * def modifyCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov): # <<<<<<<<<<<<<< @@ -4359,7 +4689,7 @@ static PyObject *__pyx_pf_3gvt_30modifyCamera(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "gvt.pyx":114 +/* "gvt.pyx":118 * _modifyCamera(name.encode(), pos.data, focus.data,up.data,fov) * * def addFilm(str name, int w, int h, str path): # <<<<<<<<<<<<<< @@ -4368,9 +4698,9 @@ static PyObject *__pyx_pf_3gvt_30modifyCamera(CYTHON_UNUSED PyObject *__pyx_self */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_33addFilm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_33addFilm = {"addFilm", (PyCFunction)__pyx_pw_3gvt_33addFilm, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_33addFilm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_35addFilm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_35addFilm = {"addFilm", (PyCFunction)__pyx_pw_3gvt_35addFilm, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_35addFilm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; int __pyx_v_w; int __pyx_v_h; @@ -4386,9 +4716,13 @@ static PyObject *__pyx_pw_3gvt_33addFilm(PyObject *__pyx_self, PyObject *__pyx_a const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -4397,24 +4731,27 @@ static PyObject *__pyx_pw_3gvt_33addFilm(PyObject *__pyx_self, PyObject *__pyx_a case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addFilm", 1, 4, 4, 1); __PYX_ERR(0, 114, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addFilm", 1, 4, 4, 1); __PYX_ERR(0, 118, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addFilm", 1, 4, 4, 2); __PYX_ERR(0, 114, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addFilm", 1, 4, 4, 2); __PYX_ERR(0, 118, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addFilm", 1, 4, 4, 3); __PYX_ERR(0, 114, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addFilm", 1, 4, 4, 3); __PYX_ERR(0, 118, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addFilm") < 0)) __PYX_ERR(0, 114, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addFilm") < 0)) __PYX_ERR(0, 118, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -4425,21 +4762,21 @@ static PyObject *__pyx_pw_3gvt_33addFilm(PyObject *__pyx_self, PyObject *__pyx_a values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_name = ((PyObject*)values[0]); - __pyx_v_w = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_w == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L3_error) - __pyx_v_h = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L3_error) + __pyx_v_w = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_w == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error) + __pyx_v_h = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error) __pyx_v_path = ((PyObject*)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addFilm", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 114, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addFilm", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 118, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addFilm", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 114, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 114, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_32addFilm(__pyx_self, __pyx_v_name, __pyx_v_w, __pyx_v_h, __pyx_v_path); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 118, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_34addFilm(__pyx_self, __pyx_v_name, __pyx_v_w, __pyx_v_h, __pyx_v_path); /* function exit code */ goto __pyx_L0; @@ -4450,7 +4787,7 @@ static PyObject *__pyx_pw_3gvt_33addFilm(PyObject *__pyx_self, PyObject *__pyx_a return __pyx_r; } -static PyObject *__pyx_pf_3gvt_32addFilm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_w, int __pyx_v_h, PyObject *__pyx_v_path) { +static PyObject *__pyx_pf_3gvt_34addFilm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_w, int __pyx_v_h, PyObject *__pyx_v_path) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4460,14 +4797,14 @@ static PyObject *__pyx_pf_3gvt_32addFilm(CYTHON_UNUSED PyObject *__pyx_self, PyO std::string __pyx_t_5; __Pyx_RefNannySetupContext("addFilm", 0); - /* "gvt.pyx":115 + /* "gvt.pyx":119 * * def addFilm(str name, int w, int h, str path): * _addFilm(name.encode(),w,h,path.encode()) # <<<<<<<<<<<<<< * * def modifyFilm(str name, int w, int h, str path): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4480,16 +4817,16 @@ static PyObject *__pyx_pf_3gvt_32addFilm(CYTHON_UNUSED PyObject *__pyx_self, PyO } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4502,18 +4839,18 @@ static PyObject *__pyx_pf_3gvt_32addFilm(CYTHON_UNUSED PyObject *__pyx_self, PyO } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addFilm(__pyx_t_4, __pyx_v_w, __pyx_v_h, __pyx_t_5); - /* "gvt.pyx":114 + /* "gvt.pyx":118 * _modifyCamera(name.encode(), pos.data, focus.data,up.data,fov) * * def addFilm(str name, int w, int h, str path): # <<<<<<<<<<<<<< @@ -4536,7 +4873,7 @@ static PyObject *__pyx_pf_3gvt_32addFilm(CYTHON_UNUSED PyObject *__pyx_self, PyO return __pyx_r; } -/* "gvt.pyx":117 +/* "gvt.pyx":121 * _addFilm(name.encode(),w,h,path.encode()) * * def modifyFilm(str name, int w, int h, str path): # <<<<<<<<<<<<<< @@ -4545,9 +4882,9 @@ static PyObject *__pyx_pf_3gvt_32addFilm(CYTHON_UNUSED PyObject *__pyx_self, PyO */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_35modifyFilm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_35modifyFilm = {"modifyFilm", (PyCFunction)__pyx_pw_3gvt_35modifyFilm, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_35modifyFilm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_37modifyFilm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_37modifyFilm = {"modifyFilm", (PyCFunction)__pyx_pw_3gvt_37modifyFilm, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_37modifyFilm(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; int __pyx_v_w; int __pyx_v_h; @@ -4563,9 +4900,13 @@ static PyObject *__pyx_pw_3gvt_35modifyFilm(PyObject *__pyx_self, PyObject *__py const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -4574,24 +4915,27 @@ static PyObject *__pyx_pw_3gvt_35modifyFilm(PyObject *__pyx_self, PyObject *__py case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyFilm", 1, 4, 4, 1); __PYX_ERR(0, 117, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyFilm", 1, 4, 4, 1); __PYX_ERR(0, 121, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyFilm", 1, 4, 4, 2); __PYX_ERR(0, 117, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyFilm", 1, 4, 4, 2); __PYX_ERR(0, 121, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("modifyFilm", 1, 4, 4, 3); __PYX_ERR(0, 117, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyFilm", 1, 4, 4, 3); __PYX_ERR(0, 121, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modifyFilm") < 0)) __PYX_ERR(0, 117, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modifyFilm") < 0)) __PYX_ERR(0, 121, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -4602,21 +4946,21 @@ static PyObject *__pyx_pw_3gvt_35modifyFilm(PyObject *__pyx_self, PyObject *__py values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_name = ((PyObject*)values[0]); - __pyx_v_w = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_w == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L3_error) - __pyx_v_h = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L3_error) + __pyx_v_w = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_w == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L3_error) + __pyx_v_h = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L3_error) __pyx_v_path = ((PyObject*)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("modifyFilm", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 117, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("modifyFilm", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 121, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.modifyFilm", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 117, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 117, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_34modifyFilm(__pyx_self, __pyx_v_name, __pyx_v_w, __pyx_v_h, __pyx_v_path); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 121, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_36modifyFilm(__pyx_self, __pyx_v_name, __pyx_v_w, __pyx_v_h, __pyx_v_path); /* function exit code */ goto __pyx_L0; @@ -4627,7 +4971,7 @@ static PyObject *__pyx_pw_3gvt_35modifyFilm(PyObject *__pyx_self, PyObject *__py return __pyx_r; } -static PyObject *__pyx_pf_3gvt_34modifyFilm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_w, int __pyx_v_h, PyObject *__pyx_v_path) { +static PyObject *__pyx_pf_3gvt_36modifyFilm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_w, int __pyx_v_h, PyObject *__pyx_v_path) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4637,14 +4981,14 @@ static PyObject *__pyx_pf_3gvt_34modifyFilm(CYTHON_UNUSED PyObject *__pyx_self, std::string __pyx_t_5; __Pyx_RefNannySetupContext("modifyFilm", 0); - /* "gvt.pyx":118 + /* "gvt.pyx":122 * * def modifyFilm(str name, int w, int h, str path): * _modifyFilm(name.encode(),w,h,path.encode()) # <<<<<<<<<<<<<< * * def addRenderer(str name, int adapter, int schedule): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4657,16 +5001,16 @@ static PyObject *__pyx_pf_3gvt_34modifyFilm(CYTHON_UNUSED PyObject *__pyx_self, } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4679,18 +5023,18 @@ static PyObject *__pyx_pf_3gvt_34modifyFilm(CYTHON_UNUSED PyObject *__pyx_self, } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; modifyFilm(__pyx_t_4, __pyx_v_w, __pyx_v_h, __pyx_t_5); - /* "gvt.pyx":117 + /* "gvt.pyx":121 * _addFilm(name.encode(),w,h,path.encode()) * * def modifyFilm(str name, int w, int h, str path): # <<<<<<<<<<<<<< @@ -4713,7 +5057,7 @@ static PyObject *__pyx_pf_3gvt_34modifyFilm(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "gvt.pyx":120 +/* "gvt.pyx":124 * _modifyFilm(name.encode(),w,h,path.encode()) * * def addRenderer(str name, int adapter, int schedule): # <<<<<<<<<<<<<< @@ -4722,9 +5066,9 @@ static PyObject *__pyx_pf_3gvt_34modifyFilm(CYTHON_UNUSED PyObject *__pyx_self, */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_37addRenderer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_37addRenderer = {"addRenderer", (PyCFunction)__pyx_pw_3gvt_37addRenderer, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_37addRenderer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_39addRenderer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_39addRenderer = {"addRenderer", (PyCFunction)__pyx_pw_3gvt_39addRenderer, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_39addRenderer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; int __pyx_v_adapter; int __pyx_v_schedule; @@ -4739,8 +5083,11 @@ static PyObject *__pyx_pw_3gvt_37addRenderer(PyObject *__pyx_self, PyObject *__p const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -4749,19 +5096,21 @@ static PyObject *__pyx_pw_3gvt_37addRenderer(PyObject *__pyx_self, PyObject *__p case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_adapter)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addRenderer", 1, 3, 3, 1); __PYX_ERR(0, 120, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addRenderer", 1, 3, 3, 1); __PYX_ERR(0, 124, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_schedule)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("addRenderer", 1, 3, 3, 2); __PYX_ERR(0, 120, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addRenderer", 1, 3, 3, 2); __PYX_ERR(0, 124, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addRenderer") < 0)) __PYX_ERR(0, 120, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addRenderer") < 0)) __PYX_ERR(0, 124, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -4771,19 +5120,19 @@ static PyObject *__pyx_pw_3gvt_37addRenderer(PyObject *__pyx_self, PyObject *__p values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_name = ((PyObject*)values[0]); - __pyx_v_adapter = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_adapter == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L3_error) - __pyx_v_schedule = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_schedule == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L3_error) + __pyx_v_adapter = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_adapter == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 124, __pyx_L3_error) + __pyx_v_schedule = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_schedule == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 124, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addRenderer", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 120, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addRenderer", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 124, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.addRenderer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 120, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_36addRenderer(__pyx_self, __pyx_v_name, __pyx_v_adapter, __pyx_v_schedule); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_38addRenderer(__pyx_self, __pyx_v_name, __pyx_v_adapter, __pyx_v_schedule); /* function exit code */ goto __pyx_L0; @@ -4794,7 +5143,7 @@ static PyObject *__pyx_pw_3gvt_37addRenderer(PyObject *__pyx_self, PyObject *__p return __pyx_r; } -static PyObject *__pyx_pf_3gvt_36addRenderer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_adapter, int __pyx_v_schedule) { +static PyObject *__pyx_pf_3gvt_38addRenderer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, int __pyx_v_adapter, int __pyx_v_schedule) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4803,14 +5152,14 @@ static PyObject *__pyx_pf_3gvt_36addRenderer(CYTHON_UNUSED PyObject *__pyx_self, std::string __pyx_t_4; __Pyx_RefNannySetupContext("addRenderer", 0); - /* "gvt.pyx":121 + /* "gvt.pyx":125 * * def addRenderer(str name, int adapter, int schedule): * _addRenderer(name.encode(),adapter,schedule) # <<<<<<<<<<<<<< * * def render(str name): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4823,18 +5172,18 @@ static PyObject *__pyx_pf_3gvt_36addRenderer(CYTHON_UNUSED PyObject *__pyx_self, } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; addRenderer(__pyx_t_4, __pyx_v_adapter, __pyx_v_schedule); - /* "gvt.pyx":120 + /* "gvt.pyx":124 * _modifyFilm(name.encode(),w,h,path.encode()) * * def addRenderer(str name, int adapter, int schedule): # <<<<<<<<<<<<<< @@ -4857,7 +5206,7 @@ static PyObject *__pyx_pf_3gvt_36addRenderer(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "gvt.pyx":123 +/* "gvt.pyx":127 * _addRenderer(name.encode(),adapter,schedule) * * def render(str name): # <<<<<<<<<<<<<< @@ -4866,14 +5215,14 @@ static PyObject *__pyx_pf_3gvt_36addRenderer(CYTHON_UNUSED PyObject *__pyx_self, */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_39render(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_39render = {"render", (PyCFunction)__pyx_pw_3gvt_39render, METH_O, 0}; -static PyObject *__pyx_pw_3gvt_39render(PyObject *__pyx_self, PyObject *__pyx_v_name) { +static PyObject *__pyx_pw_3gvt_41render(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_41render = {"render", (PyCFunction)__pyx_pw_3gvt_41render, METH_O, 0}; +static PyObject *__pyx_pw_3gvt_41render(PyObject *__pyx_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("render (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 123, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_38render(__pyx_self, ((PyObject*)__pyx_v_name)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_40render(__pyx_self, ((PyObject*)__pyx_v_name)); /* function exit code */ goto __pyx_L0; @@ -4884,7 +5233,7 @@ static PyObject *__pyx_pw_3gvt_39render(PyObject *__pyx_self, PyObject *__pyx_v_ return __pyx_r; } -static PyObject *__pyx_pf_3gvt_38render(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { +static PyObject *__pyx_pf_3gvt_40render(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4893,14 +5242,14 @@ static PyObject *__pyx_pf_3gvt_38render(CYTHON_UNUSED PyObject *__pyx_self, PyOb std::string __pyx_t_4; __Pyx_RefNannySetupContext("render", 0); - /* "gvt.pyx":124 + /* "gvt.pyx":128 * * def render(str name): * _render(name.encode()) # <<<<<<<<<<<<<< * * def writeimage(str name, str output): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4913,18 +5262,18 @@ static PyObject *__pyx_pf_3gvt_38render(CYTHON_UNUSED PyObject *__pyx_self, PyOb } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; render(__pyx_t_4); - /* "gvt.pyx":123 + /* "gvt.pyx":127 * _addRenderer(name.encode(),adapter,schedule) * * def render(str name): # <<<<<<<<<<<<<< @@ -4947,7 +5296,7 @@ static PyObject *__pyx_pf_3gvt_38render(CYTHON_UNUSED PyObject *__pyx_self, PyOb return __pyx_r; } -/* "gvt.pyx":126 +/* "gvt.pyx":130 * _render(name.encode()) * * def writeimage(str name, str output): # <<<<<<<<<<<<<< @@ -4955,9 +5304,9 @@ static PyObject *__pyx_pf_3gvt_38render(CYTHON_UNUSED PyObject *__pyx_self, PyOb */ /* Python wrapper */ -static PyObject *__pyx_pw_3gvt_41writeimage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_3gvt_41writeimage = {"writeimage", (PyCFunction)__pyx_pw_3gvt_41writeimage, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_3gvt_41writeimage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_3gvt_43writeimage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_3gvt_43writeimage = {"writeimage", (PyCFunction)__pyx_pw_3gvt_43writeimage, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_3gvt_43writeimage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_output = 0; PyObject *__pyx_r = 0; @@ -4971,7 +5320,9 @@ static PyObject *__pyx_pw_3gvt_41writeimage(PyObject *__pyx_self, PyObject *__py const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -4980,14 +5331,15 @@ static PyObject *__pyx_pw_3gvt_41writeimage(PyObject *__pyx_self, PyObject *__py case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_output)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("writeimage", 1, 2, 2, 1); __PYX_ERR(0, 126, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("writeimage", 1, 2, 2, 1); __PYX_ERR(0, 130, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeimage") < 0)) __PYX_ERR(0, 126, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeimage") < 0)) __PYX_ERR(0, 130, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5000,15 +5352,15 @@ static PyObject *__pyx_pw_3gvt_41writeimage(PyObject *__pyx_self, PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("writeimage", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 126, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("writeimage", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 130, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gvt.writeimage", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 126, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_output), (&PyString_Type), 1, "output", 1))) __PYX_ERR(0, 126, __pyx_L1_error) - __pyx_r = __pyx_pf_3gvt_40writeimage(__pyx_self, __pyx_v_name, __pyx_v_output); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 130, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_output), (&PyString_Type), 1, "output", 1))) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_r = __pyx_pf_3gvt_42writeimage(__pyx_self, __pyx_v_name, __pyx_v_output); /* function exit code */ goto __pyx_L0; @@ -5019,7 +5371,7 @@ static PyObject *__pyx_pw_3gvt_41writeimage(PyObject *__pyx_self, PyObject *__py return __pyx_r; } -static PyObject *__pyx_pf_3gvt_40writeimage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_output) { +static PyObject *__pyx_pf_3gvt_42writeimage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_output) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -5029,12 +5381,12 @@ static PyObject *__pyx_pf_3gvt_40writeimage(CYTHON_UNUSED PyObject *__pyx_self, std::string __pyx_t_5; __Pyx_RefNannySetupContext("writeimage", 0); - /* "gvt.pyx":127 + /* "gvt.pyx":131 * * def writeimage(str name, str output): * _writeimage(name.encode(),output.encode()) # <<<<<<<<<<<<<< */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5047,16 +5399,16 @@ static PyObject *__pyx_pf_3gvt_40writeimage(CYTHON_UNUSED PyObject *__pyx_self, } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5069,18 +5421,18 @@ static PyObject *__pyx_pf_3gvt_40writeimage(CYTHON_UNUSED PyObject *__pyx_self, } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; writeimage(__pyx_t_4, __pyx_t_5); - /* "gvt.pyx":126 + /* "gvt.pyx":130 * _render(name.encode()) * * def writeimage(str name, str output): # <<<<<<<<<<<<<< @@ -5102,7 +5454,7 @@ static PyObject *__pyx_pf_3gvt_40writeimage(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":197 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":197 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -5149,7 +5501,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __Pyx_GIVEREF(__pyx_v_info->obj); } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":203 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":203 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< @@ -5162,7 +5514,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L0; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":206 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":206 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -5171,7 +5523,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_endian_detector = 1; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":207 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":207 * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -5180,7 +5532,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":209 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":209 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -5189,7 +5541,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":211 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":211 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -5199,7 +5551,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":212 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":212 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< @@ -5208,7 +5560,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_copy_shape = 1; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":211 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":211 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -5218,7 +5570,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L4; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":214 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":214 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< @@ -5230,7 +5582,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L4:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":216 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -5244,7 +5596,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L6_bool_binop_done; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":217 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":217 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< @@ -5255,7 +5607,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = __pyx_t_2; __pyx_L6_bool_binop_done:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":216 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -5264,7 +5616,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ if (__pyx_t_1) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":218 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":218 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< @@ -5277,7 +5629,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 218, __pyx_L1_error) - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":216 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -5286,7 +5638,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":220 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -5300,7 +5652,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L9_bool_binop_done; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":221 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":221 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< @@ -5311,7 +5663,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = __pyx_t_2; __pyx_L9_bool_binop_done:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":220 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -5320,7 +5672,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ if (__pyx_t_1) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":222 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":222 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< @@ -5333,7 +5685,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 222, __pyx_L1_error) - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":220 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -5342,7 +5694,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":224 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":224 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< @@ -5351,7 +5703,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":225 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":225 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< @@ -5360,7 +5712,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->ndim = __pyx_v_ndim; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":226 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":226 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< @@ -5370,7 +5722,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = (__pyx_v_copy_shape != 0); if (__pyx_t_1) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":229 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< @@ -5379,7 +5731,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":230 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":230 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< @@ -5388,7 +5740,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":231 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< @@ -5399,7 +5751,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":232 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":232 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< @@ -5408,7 +5760,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":233 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< @@ -5418,7 +5770,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":226 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":226 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< @@ -5428,7 +5780,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L11; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":235 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":235 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -5438,7 +5790,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P /*else*/ { __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":236 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":236 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -5449,7 +5801,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L11:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":237 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< @@ -5458,7 +5810,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->suboffsets = NULL; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":238 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":238 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< @@ -5467,7 +5819,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":239 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":239 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< @@ -5476,7 +5828,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":242 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":242 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< @@ -5485,7 +5837,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_f = NULL; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":243 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":243 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< @@ -5497,7 +5849,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":246 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< @@ -5506,7 +5858,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":248 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< @@ -5524,7 +5876,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_L15_bool_binop_done:; if (__pyx_t_1) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":250 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< @@ -5537,7 +5889,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":248 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< @@ -5547,7 +5899,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L14; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":253 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< @@ -5563,7 +5915,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L14:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":255 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< @@ -5573,7 +5925,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":256 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< @@ -5583,7 +5935,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_4 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_4; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":257 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -5603,7 +5955,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L20_next_or:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< @@ -5620,7 +5972,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = __pyx_t_2; __pyx_L19_bool_binop_done:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":257 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -5629,7 +5981,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ if (__pyx_t_1) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":259 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -5642,7 +5994,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 259, __pyx_L1_error) - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":257 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -5651,7 +6003,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":260 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":260 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< @@ -5663,7 +6015,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"b"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":261 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< @@ -5674,7 +6026,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"B"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":262 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":262 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< @@ -5685,7 +6037,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"h"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":263 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< @@ -5696,7 +6048,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"H"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":264 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":264 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< @@ -5707,7 +6059,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"i"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":265 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< @@ -5718,7 +6070,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"I"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":266 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< @@ -5729,7 +6081,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"l"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":267 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":267 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< @@ -5740,7 +6092,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"L"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":268 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< @@ -5751,7 +6103,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"q"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":269 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":269 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< @@ -5762,7 +6114,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"Q"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< @@ -5773,7 +6125,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"f"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":271 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< @@ -5784,7 +6136,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"d"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< @@ -5795,7 +6147,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"g"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":273 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":273 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< @@ -5806,7 +6158,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"Zf"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< @@ -5817,7 +6169,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"Zd"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":275 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< @@ -5828,7 +6180,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = ((char *)"Zg"); break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< @@ -5840,7 +6192,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; default: - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":278 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< @@ -5866,7 +6218,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":279 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< @@ -5875,7 +6227,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->format = __pyx_v_f; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< @@ -5885,7 +6237,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_r = 0; goto __pyx_L0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":255 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< @@ -5894,7 +6246,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":282 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< @@ -5904,7 +6256,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P /*else*/ { __pyx_v_info->format = ((char *)malloc(0xFF)); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":283 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< @@ -5913,7 +6265,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ (__pyx_v_info->format[0]) = '^'; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":284 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< @@ -5922,7 +6274,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_offset = 0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":285 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285 * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< @@ -5932,7 +6284,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) __PYX_ERR(1, 285, __pyx_L1_error) __pyx_v_f = __pyx_t_7; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":288 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< @@ -5942,7 +6294,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P (__pyx_v_f[0]) = '\x00'; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":197 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":197 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -5974,7 +6326,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":290 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -5998,7 +6350,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":291 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< @@ -6008,7 +6360,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":292 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< @@ -6017,7 +6369,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s */ free(__pyx_v_info->format); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":291 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< @@ -6026,7 +6378,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s */ } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":293 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -6036,7 +6388,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":294 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< @@ -6045,7 +6397,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s */ free(__pyx_v_info->strides); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":293 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -6054,7 +6406,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s */ } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":290 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -6066,7 +6418,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s __Pyx_RefNannyFinishContext(); } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":770 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":770 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -6080,7 +6432,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":771 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":771 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -6094,7 +6446,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":770 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":770 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -6113,7 +6465,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":773 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":773 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -6127,7 +6479,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":774 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":774 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -6141,7 +6493,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":773 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":773 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -6160,7 +6512,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":776 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -6174,7 +6526,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":777 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -6188,7 +6540,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":776 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -6207,7 +6559,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":779 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -6221,7 +6573,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":780 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":780 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -6235,7 +6587,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":779 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -6254,7 +6606,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":782 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":782 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -6268,7 +6620,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":783 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -6282,7 +6634,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":782 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":782 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -6301,7 +6653,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":785 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -6330,7 +6682,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx char *__pyx_t_9; __Pyx_RefNannySetupContext("_util_dtypestring", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":790 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790 * * cdef dtype child * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -6339,7 +6691,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_endian_detector = 1; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":791 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791 * cdef dtype child * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -6348,7 +6700,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":794 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -6371,7 +6723,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":795 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":795 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< @@ -6388,7 +6740,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":796 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":796 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< @@ -6427,7 +6779,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); __pyx_t_4 = 0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":798 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":798 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< @@ -6444,7 +6796,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); if (__pyx_t_6) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":799 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< @@ -6457,7 +6809,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 799, __pyx_L1_error) - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":798 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":798 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< @@ -6466,7 +6818,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":801 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -6486,7 +6838,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } __pyx_L8_next_or:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":802 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< @@ -6503,7 +6855,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_6 = __pyx_t_7; __pyx_L7_bool_binop_done:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":801 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -6512,7 +6864,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ if (__pyx_t_6) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":803 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -6525,7 +6877,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 803, __pyx_L1_error) - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":801 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -6534,7 +6886,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":813 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< @@ -6550,7 +6902,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_6) break; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":814 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":814 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< @@ -6559,7 +6911,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ (__pyx_v_f[0]) = 0x78; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":815 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< @@ -6568,7 +6920,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_f = (__pyx_v_f + 1); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":816 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< @@ -6579,7 +6931,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":818 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":818 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< @@ -6589,7 +6941,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":820 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":820 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< @@ -6599,7 +6951,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_6) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< @@ -6611,7 +6963,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); __pyx_t_4 = 0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":822 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< @@ -6621,7 +6973,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_6) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":823 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< @@ -6634,7 +6986,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 823, __pyx_L1_error) - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":822 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< @@ -6643,7 +6995,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":826 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":826 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< @@ -6661,7 +7013,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< @@ -6679,7 +7031,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":828 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< @@ -6697,7 +7049,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":829 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":829 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< @@ -6715,7 +7067,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< @@ -6733,7 +7085,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":831 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< @@ -6751,7 +7103,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":832 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":832 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< @@ -6769,7 +7121,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< @@ -6787,7 +7139,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":834 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< @@ -6805,7 +7157,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":835 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":835 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< @@ -6823,7 +7175,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< @@ -6841,7 +7193,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< @@ -6859,7 +7211,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":838 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< @@ -6877,7 +7229,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":839 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":839 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< @@ -6897,7 +7249,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":840 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< @@ -6917,7 +7269,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":841 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":841 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< @@ -6937,7 +7289,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< @@ -6955,7 +7307,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":844 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":844 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< @@ -6979,7 +7331,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } __pyx_L15:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":845 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":845 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< @@ -6988,7 +7340,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_f = (__pyx_v_f + 1); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":820 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":820 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< @@ -6998,7 +7350,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L13; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":849 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":849 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< @@ -7011,7 +7363,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } __pyx_L13:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":794 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -7021,7 +7373,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":850 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":850 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< @@ -7031,7 +7383,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_r = __pyx_v_f; goto __pyx_L0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":785 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -7056,7 +7408,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":966 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":966 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -7071,7 +7423,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a int __pyx_t_2; __Pyx_RefNannySetupContext("set_array_base", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":968 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":968 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< @@ -7082,7 +7434,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":969 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":969 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< @@ -7091,7 +7443,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ __pyx_v_baseptr = NULL; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":968 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":968 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< @@ -7101,7 +7453,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a goto __pyx_L3; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":971 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":971 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< @@ -7111,7 +7463,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a /*else*/ { Py_INCREF(__pyx_v_base); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":972 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":972 * else: * Py_INCREF(base) # important to do this before decref below! * baseptr = base # <<<<<<<<<<<<<< @@ -7122,7 +7474,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a } __pyx_L3:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":973 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":973 * Py_INCREF(base) # important to do this before decref below! * baseptr = base * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< @@ -7131,7 +7483,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_XDECREF(__pyx_v_arr->base); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":974 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":974 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< @@ -7140,7 +7492,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ __pyx_v_arr->base = __pyx_v_baseptr; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":966 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":966 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -7152,7 +7504,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __Pyx_RefNannyFinishContext(); } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":976 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -7166,7 +7518,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":977 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":977 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< @@ -7176,7 +7528,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); if (__pyx_t_1) { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":978 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":978 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< @@ -7188,7 +7540,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; goto __pyx_L0; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":977 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":977 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< @@ -7197,7 +7549,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":980 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":980 * return None * else: * return arr.base # <<<<<<<<<<<<<< @@ -7211,7 +7563,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py goto __pyx_L0; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":976 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -7226,7 +7578,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":985 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":985 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -7247,7 +7599,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_array", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":986 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":986 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -7263,7 +7615,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":987 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":987 * cdef inline int import_array() except -1: * try: * _import_array() # <<<<<<<<<<<<<< @@ -7272,7 +7624,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 987, __pyx_L3_error) - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":986 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":986 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -7283,11 +7635,11 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L10_try_end; + goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":988 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":988 * try: * _import_array() * except Exception: # <<<<<<<<<<<<<< @@ -7302,7 +7654,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":989 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":989 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -7318,7 +7670,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":986 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":986 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -7331,10 +7683,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; - __pyx_L10_try_end:; + __pyx_L8_try_end:; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":985 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":985 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -7357,7 +7709,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":991 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":991 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -7378,7 +7730,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_umath", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":992 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":992 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -7394,7 +7746,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":993 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":993 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -7403,7 +7755,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 993, __pyx_L3_error) - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":992 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":992 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -7414,11 +7766,11 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L10_try_end; + goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":994 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":994 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -7433,7 +7785,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":995 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":995 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -7449,7 +7801,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":992 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":992 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -7462,10 +7814,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; - __pyx_L10_try_end:; + __pyx_L8_try_end:; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":991 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":991 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -7488,7 +7840,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":997 +/* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -7509,7 +7861,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_ufunc", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":998 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":998 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -7525,7 +7877,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":999 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":999 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -7534,7 +7886,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 999, __pyx_L3_error) - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":998 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":998 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -7545,11 +7897,11 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L10_try_end; + goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1000 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1000 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -7563,7 +7915,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1001 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1001 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -7577,7 +7929,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":998 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":998 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -7590,10 +7942,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; - __pyx_L10_try_end:; + __pyx_L8_try_end:; } - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":997 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -7621,21 +7973,21 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { * @cname("__pyx_convert_string_from_py_std__in_string") * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: # <<<<<<<<<<<<<< * cdef Py_ssize_t length - * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) */ static std::string __pyx_convert_string_from_py_std__in_string(PyObject *__pyx_v_o) { Py_ssize_t __pyx_v_length; - char *__pyx_v_data; + char const *__pyx_v_data; std::string __pyx_r; __Pyx_RefNannyDeclarations - char *__pyx_t_1; + char const *__pyx_t_1; __Pyx_RefNannySetupContext("__pyx_convert_string_from_py_std__in_string", 0); /* "string.from_py":15 * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: * cdef Py_ssize_t length - * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) # <<<<<<<<<<<<<< + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) # <<<<<<<<<<<<<< * return string(data, length) * */ @@ -7644,7 +7996,7 @@ static std::string __pyx_convert_string_from_py_std__in_string(PyObject *__pyx_v /* "string.from_py":16 * cdef Py_ssize_t length - * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) * return string(data, length) # <<<<<<<<<<<<<< * * @@ -7657,12 +8009,13 @@ static std::string __pyx_convert_string_from_py_std__in_string(PyObject *__pyx_v * @cname("__pyx_convert_string_from_py_std__in_string") * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: # <<<<<<<<<<<<<< * cdef Py_ssize_t length - * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -7711,11 +8064,14 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_addPointLight, __pyx_k_addPointLight, sizeof(__pyx_k_addPointLight), 0, 0, 1, 1}, {&__pyx_n_s_addRenderer, __pyx_k_addRenderer, sizeof(__pyx_k_addRenderer), 0, 0, 1, 1}, {&__pyx_n_s_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 0, 0, 1, 1}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_color, __pyx_k_color, sizeof(__pyx_k_color), 0, 0, 1, 1}, {&__pyx_n_s_compute_normal, __pyx_k_compute_normal, sizeof(__pyx_k_compute_normal), 0, 0, 1, 1}, {&__pyx_n_s_createMesh, __pyx_k_createMesh, sizeof(__pyx_k_createMesh), 0, 0, 1, 1}, {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1}, {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1}, + {&__pyx_n_s_dirname, __pyx_k_dirname, sizeof(__pyx_k_dirname), 0, 0, 1, 1}, + {&__pyx_n_s_dist, __pyx_k_dist, sizeof(__pyx_k_dist), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_finishMesh, __pyx_k_finishMesh, sizeof(__pyx_k_finishMesh), 0, 0, 1, 1}, {&__pyx_n_s_focus, __pyx_k_focus, sizeof(__pyx_k_focus), 0, 0, 1, 1}, @@ -7723,7 +8079,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_gvt, __pyx_k_gvt, sizeof(__pyx_k_gvt), 0, 0, 1, 1}, {&__pyx_n_s_gvtInit, __pyx_k_gvtInit, sizeof(__pyx_k_gvtInit), 0, 0, 1, 1}, {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1}, - {&__pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_k_home_jbarbosa_r_pygvt_src_gvt_g, sizeof(__pyx_k_home_jbarbosa_r_pygvt_src_gvt_g), 0, 0, 1, 0}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_jitter, __pyx_k_jitter, sizeof(__pyx_k_jitter), 0, 0, 1, 1}, {&__pyx_n_s_kd, __pyx_k_kd, sizeof(__pyx_k_kd), 0, 0, 1, 1}, @@ -7747,10 +8102,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1}, {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, + {&__pyx_n_s_readPly, __pyx_k_readPly, sizeof(__pyx_k_readPly), 0, 0, 1, 1}, {&__pyx_n_s_render, __pyx_k_render, sizeof(__pyx_k_render), 0, 0, 1, 1}, {&__pyx_n_s_samples, __pyx_k_samples, sizeof(__pyx_k_samples), 0, 0, 1, 1}, {&__pyx_n_s_schedule, __pyx_k_schedule, sizeof(__pyx_k_schedule), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, + {&__pyx_kp_s_src_gvt_gvt_pyx, __pyx_k_src_gvt_gvt_pyx, sizeof(__pyx_k_src_gvt_gvt_pyx), 0, 0, 1, 0}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_triangles, __pyx_k_triangles, sizeof(__pyx_k_triangles), 0, 0, 1, 1}, @@ -7758,6 +8115,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_up, __pyx_k_up, sizeof(__pyx_k_up), 0, 0, 1, 1}, {&__pyx_n_s_vertices, __pyx_k_vertices, sizeof(__pyx_k_vertices), 0, 0, 1, 1}, {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, + {&__pyx_n_s_world_bounds, __pyx_k_world_bounds, sizeof(__pyx_k_world_bounds), 0, 0, 1, 1}, {&__pyx_n_s_writeimage, __pyx_k_writeimage, sizeof(__pyx_k_writeimage), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; @@ -7775,7 +8133,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":218 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":218 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< @@ -7786,7 +8144,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":222 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":222 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< @@ -7797,7 +8155,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":259 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -7808,7 +8166,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":799 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< @@ -7819,7 +8177,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":803 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -7830,7 +8188,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":823 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< @@ -7841,7 +8199,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":989 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":989 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -7852,7 +8210,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":995 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":995 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -7863,7 +8221,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "virtual/pygvt/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1001 + /* "../../../../anaconda3/envs/pygvt/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1001 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -7872,253 +8230,265 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "gvt.pyx":44 + /* "gvt.pyx":45 * #void gvtInit(int &argc, char **&argv) * * def gvtInit(): # <<<<<<<<<<<<<< * # cdef char **c_argv * # c_argv = malloc(sizeof(char*) * len(sys.argv)) */ - __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_gvtInit, 44, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_gvtInit, 45, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 45, __pyx_L1_error) - /* "gvt.pyx":66 + /* "gvt.pyx":67 * # _gvtInit(argc,argv) * - * def createMesh(str name): # <<<<<<<<<<<<<< - * _createMesh(name.encode()) + * def readPly(str dirname, bool dist, np.ndarray[float, ndim=1, mode="c"] world_bounds): # <<<<<<<<<<<<<< + * _readPly(dirname.encode(), dist, world_bounds.data) * */ - __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_name); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_tuple__11 = PyTuple_Pack(3, __pyx_n_s_dirname, __pyx_n_s_dist, __pyx_n_s_world_bounds); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_createMesh, 66, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_readPly, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 67, __pyx_L1_error) + + /* "gvt.pyx":70 + * _readPly(dirname.encode(), dist, world_bounds.data) + * + * def createMesh(str name): # <<<<<<<<<<<<<< + * _createMesh(name.encode()) + * + */ + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_name); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_createMesh, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 70, __pyx_L1_error) - /* "gvt.pyx":69 + /* "gvt.pyx":73 * _createMesh(name.encode()) * * def addMeshVertices(str name, int size, np.ndarray[float, ndim=1, mode="c"] vertices not None): # <<<<<<<<<<<<<< * _addMeshVertices(name.encode(),size, vertices.data) * */ - __pyx_tuple__13 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_size, __pyx_n_s_vertices); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 69, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__13); - __Pyx_GIVEREF(__pyx_tuple__13); - __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addMeshVertices, 69, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_size, __pyx_n_s_vertices); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addMeshVertices, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 73, __pyx_L1_error) - /* "gvt.pyx":72 + /* "gvt.pyx":76 * _addMeshVertices(name.encode(),size, vertices.data) * * def addMeshTriangles(str name, unsigned n, np.ndarray[unsigned, ndim=1, mode="c"] triangles): # <<<<<<<<<<<<<< * _addMeshTriangles(name.encode(), n, triangles.data) * */ - __pyx_tuple__15 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_n, __pyx_n_s_triangles); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__15); - __Pyx_GIVEREF(__pyx_tuple__15); - __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addMeshTriangles, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_tuple__17 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_n, __pyx_n_s_triangles); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addMeshTriangles, 76, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 76, __pyx_L1_error) - /* "gvt.pyx":75 + /* "gvt.pyx":79 * _addMeshTriangles(name.encode(), n, triangles.data) * * def addMeshFaceNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): # <<<<<<<<<<<<<< * _addMeshFaceNormals(name.encode(), n, normals.data) * */ - __pyx_tuple__17 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_n, __pyx_n_s_normals); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 75, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__17); - __Pyx_GIVEREF(__pyx_tuple__17); - __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addMeshFaceNormals, 75, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_tuple__19 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_n, __pyx_n_s_normals); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); + __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addMeshFaceNormals, 79, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 79, __pyx_L1_error) - /* "gvt.pyx":78 + /* "gvt.pyx":82 * _addMeshFaceNormals(name.encode(), n, normals.data) * * def addMeshVertexNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): # <<<<<<<<<<<<<< * _addMeshVertexNormals(name.encode(),n, normals.data) * */ - __pyx_tuple__19 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_n, __pyx_n_s_normals); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__19); - __Pyx_GIVEREF(__pyx_tuple__19); - __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addMeshVertexNormals, 78, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_n, __pyx_n_s_normals); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addMeshVertexNormals, 82, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 82, __pyx_L1_error) - /* "gvt.pyx":81 + /* "gvt.pyx":85 * _addMeshVertexNormals(name.encode(),n, normals.data) * * def finishMesh( str name, bool compute_normal = True): # <<<<<<<<<<<<<< * _finishMesh(name.encode(),compute_normal) * */ - __pyx_tuple__21 = PyTuple_Pack(2, __pyx_n_s_name, __pyx_n_s_compute_normal); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 81, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__21); - __Pyx_GIVEREF(__pyx_tuple__21); - __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_finishMesh, 81, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_name, __pyx_n_s_compute_normal); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); + __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_finishMesh, 85, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 85, __pyx_L1_error) - /* "gvt.pyx":84 + /* "gvt.pyx":88 * _finishMesh(name.encode(),compute_normal) * * def addMeshMaterialLambert( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, float alpha): # <<<<<<<<<<<<<< * _addMeshMaterial(name.encode() ,mattype, kd.data, alpha) * */ - __pyx_tuple__23 = PyTuple_Pack(4, __pyx_n_s_name, __pyx_n_s_mattype, __pyx_n_s_kd, __pyx_n_s_alpha); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 84, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__23); - __Pyx_GIVEREF(__pyx_tuple__23); - __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addMeshMaterialLambert, 84, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_name, __pyx_n_s_mattype, __pyx_n_s_kd, __pyx_n_s_alpha); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__25); + __Pyx_GIVEREF(__pyx_tuple__25); + __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addMeshMaterialLambert, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 88, __pyx_L1_error) - /* "gvt.pyx":87 + /* "gvt.pyx":91 * _addMeshMaterial(name.encode() ,mattype, kd.data, alpha) * * def addMeshMaterialSpecular( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, np.ndarray[float, ndim=1, mode="c"] ks, float alpha ): # <<<<<<<<<<<<<< * _addMeshMaterial2(name.encode(), mattype, kd.data, ks.data, alpha) * */ - __pyx_tuple__25 = PyTuple_Pack(5, __pyx_n_s_name, __pyx_n_s_mattype, __pyx_n_s_kd, __pyx_n_s_ks, __pyx_n_s_alpha); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 87, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__25); - __Pyx_GIVEREF(__pyx_tuple__25); - __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addMeshMaterialSpecular, 87, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_tuple__27 = PyTuple_Pack(5, __pyx_n_s_name, __pyx_n_s_mattype, __pyx_n_s_kd, __pyx_n_s_ks, __pyx_n_s_alpha); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 91, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); + __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addMeshMaterialSpecular, 91, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 91, __pyx_L1_error) - /* "gvt.pyx":93 + /* "gvt.pyx":97 * # _addMeshMaterials(name.encode(),n, mattype.data, kd.data, ks.float, alpha.data) * * def addInstance(str name, np.ndarray[float, ndim=1, mode="c"] m): # <<<<<<<<<<<<<< * _addInstance(name.encode(), m.data) * */ - __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_name, __pyx_n_s_m); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 93, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); - __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addInstance, 93, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_name, __pyx_n_s_m); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addInstance, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 97, __pyx_L1_error) - /* "gvt.pyx":96 + /* "gvt.pyx":100 * _addInstance(name.encode(), m.data) * * def addPointLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): # <<<<<<<<<<<<<< * _addPointLight(name.encode(), pos.data, color.data) * */ - __pyx_tuple__29 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_color); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 96, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__29); - __Pyx_GIVEREF(__pyx_tuple__29); - __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addPointLight, 96, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_tuple__31 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_color); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); + __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addPointLight, 100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 100, __pyx_L1_error) - /* "gvt.pyx":99 + /* "gvt.pyx":103 * _addPointLight(name.encode(), pos.data, color.data) * * def addAreaLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): # <<<<<<<<<<<<<< * _addAreaLight(name.encode(), pos.data, color.data, n.data, w, h) * */ - __pyx_tuple__31 = PyTuple_Pack(6, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_color, __pyx_n_s_n, __pyx_n_s_w, __pyx_n_s_h); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 99, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__31); - __Pyx_GIVEREF(__pyx_tuple__31); - __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addAreaLight, 99, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_tuple__33 = PyTuple_Pack(6, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_color, __pyx_n_s_n, __pyx_n_s_w, __pyx_n_s_h); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addAreaLight, 103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 103, __pyx_L1_error) - /* "gvt.pyx":102 + /* "gvt.pyx":106 * _addAreaLight(name.encode(), pos.data, color.data, n.data, w, h) * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): # <<<<<<<<<<<<<< * _modifyLight(name.encode(),pos.data, color.data) * */ - __pyx_tuple__33 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_color); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__33); - __Pyx_GIVEREF(__pyx_tuple__33); - __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_modifyLight, 102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_tuple__35 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_color); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); + __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_modifyLight, 106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 106, __pyx_L1_error) - /* "gvt.pyx":105 + /* "gvt.pyx":109 * _modifyLight(name.encode(),pos.data, color.data) * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): # <<<<<<<<<<<<<< * _modifyLight(name.encode(),pos.data,color.data,n.data,w,h) * */ - __pyx_tuple__35 = PyTuple_Pack(6, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_color, __pyx_n_s_n, __pyx_n_s_w, __pyx_n_s_h); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 105, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__35); - __Pyx_GIVEREF(__pyx_tuple__35); - __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_modifyLight, 105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_tuple__37 = PyTuple_Pack(6, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_color, __pyx_n_s_n, __pyx_n_s_w, __pyx_n_s_h); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__37); + __Pyx_GIVEREF(__pyx_tuple__37); + __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_modifyLight, 109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 109, __pyx_L1_error) - /* "gvt.pyx":108 + /* "gvt.pyx":112 * _modifyLight(name.encode(),pos.data,color.data,n.data,w,h) * * def addCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov, int depth, int samples, float jitter): # <<<<<<<<<<<<<< * _addCamera(name.encode(), pos.data, focus.data,up.data,fov,depth,samples,jitter) * */ - __pyx_tuple__37 = PyTuple_Pack(8, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_focus, __pyx_n_s_up, __pyx_n_s_fov, __pyx_n_s_depth, __pyx_n_s_samples, __pyx_n_s_jitter); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 108, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__37); - __Pyx_GIVEREF(__pyx_tuple__37); - __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addCamera, 108, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_tuple__39 = PyTuple_Pack(8, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_focus, __pyx_n_s_up, __pyx_n_s_fov, __pyx_n_s_depth, __pyx_n_s_samples, __pyx_n_s_jitter); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addCamera, 112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 112, __pyx_L1_error) - /* "gvt.pyx":111 + /* "gvt.pyx":115 * _addCamera(name.encode(), pos.data, focus.data,up.data,fov,depth,samples,jitter) * * def modifyCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov): # <<<<<<<<<<<<<< * _modifyCamera(name.encode(), pos.data, focus.data,up.data,fov) * */ - __pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_focus, __pyx_n_s_up, __pyx_n_s_fov); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 111, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__39); - __Pyx_GIVEREF(__pyx_tuple__39); - __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_modifyCamera, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(5, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_focus, __pyx_n_s_up, __pyx_n_s_fov); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_modifyCamera, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 115, __pyx_L1_error) - /* "gvt.pyx":114 + /* "gvt.pyx":118 * _modifyCamera(name.encode(), pos.data, focus.data,up.data,fov) * * def addFilm(str name, int w, int h, str path): # <<<<<<<<<<<<<< * _addFilm(name.encode(),w,h,path.encode()) * */ - __pyx_tuple__41 = PyTuple_Pack(4, __pyx_n_s_name, __pyx_n_s_w, __pyx_n_s_h, __pyx_n_s_path); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 114, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__41); - __Pyx_GIVEREF(__pyx_tuple__41); - __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addFilm, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(4, __pyx_n_s_name, __pyx_n_s_w, __pyx_n_s_h, __pyx_n_s_path); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addFilm, 118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 118, __pyx_L1_error) - /* "gvt.pyx":117 + /* "gvt.pyx":121 * _addFilm(name.encode(),w,h,path.encode()) * * def modifyFilm(str name, int w, int h, str path): # <<<<<<<<<<<<<< * _modifyFilm(name.encode(),w,h,path.encode()) * */ - __pyx_tuple__43 = PyTuple_Pack(4, __pyx_n_s_name, __pyx_n_s_w, __pyx_n_s_h, __pyx_n_s_path); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 117, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__43); - __Pyx_GIVEREF(__pyx_tuple__43); - __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_modifyFilm, 117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_tuple__45 = PyTuple_Pack(4, __pyx_n_s_name, __pyx_n_s_w, __pyx_n_s_h, __pyx_n_s_path); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_modifyFilm, 121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 121, __pyx_L1_error) - /* "gvt.pyx":120 + /* "gvt.pyx":124 * _modifyFilm(name.encode(),w,h,path.encode()) * * def addRenderer(str name, int adapter, int schedule): # <<<<<<<<<<<<<< * _addRenderer(name.encode(),adapter,schedule) * */ - __pyx_tuple__45 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_adapter, __pyx_n_s_schedule); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 120, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__45); - __Pyx_GIVEREF(__pyx_tuple__45); - __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_addRenderer, 120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_adapter, __pyx_n_s_schedule); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__47); + __Pyx_GIVEREF(__pyx_tuple__47); + __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_addRenderer, 124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 124, __pyx_L1_error) - /* "gvt.pyx":123 + /* "gvt.pyx":127 * _addRenderer(name.encode(),adapter,schedule) * * def render(str name): # <<<<<<<<<<<<<< * _render(name.encode()) * */ - __pyx_tuple__47 = PyTuple_Pack(1, __pyx_n_s_name); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 123, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__47); - __Pyx_GIVEREF(__pyx_tuple__47); - __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_render, 123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_tuple__49 = PyTuple_Pack(1, __pyx_n_s_name); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); + __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_render, 127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 127, __pyx_L1_error) - /* "gvt.pyx":126 + /* "gvt.pyx":130 * _render(name.encode()) * * def writeimage(str name, str output): # <<<<<<<<<<<<<< * _writeimage(name.encode(),output.encode()) */ - __pyx_tuple__49 = PyTuple_Pack(2, __pyx_n_s_name, __pyx_n_s_output); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 126, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__49); - __Pyx_GIVEREF(__pyx_tuple__49); - __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_jbarbosa_r_pygvt_src_gvt_g, __pyx_n_s_writeimage, 126, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_tuple__51 = PyTuple_Pack(2, __pyx_n_s_name, __pyx_n_s_output); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__51); + __Pyx_GIVEREF(__pyx_tuple__51); + __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gvt_gvt_pyx, __pyx_n_s_writeimage, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -8189,6 +8559,7 @@ PyMODINIT_FUNC PyInit_gvt(void) __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif @@ -8273,255 +8644,267 @@ PyMODINIT_FUNC PyInit_gvt(void) if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":44 + /* "gvt.pyx":45 * #void gvtInit(int &argc, char **&argv) * * def gvtInit(): # <<<<<<<<<<<<<< * # cdef char **c_argv * # c_argv = malloc(sizeof(char*) * len(sys.argv)) */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_1gvtInit, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_1gvtInit, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_gvtInit, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_gvtInit, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":66 + /* "gvt.pyx":67 * # _gvtInit(argc,argv) * + * def readPly(str dirname, bool dist, np.ndarray[float, ndim=1, mode="c"] world_bounds): # <<<<<<<<<<<<<< + * _readPly(dirname.encode(), dist, world_bounds.data) + * + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_3readPly, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_readPly, __pyx_t_1) < 0) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "gvt.pyx":70 + * _readPly(dirname.encode(), dist, world_bounds.data) + * * def createMesh(str name): # <<<<<<<<<<<<<< * _createMesh(name.encode()) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_3createMesh, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_5createMesh, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_createMesh, __pyx_t_1) < 0) __PYX_ERR(0, 66, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_createMesh, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":69 + /* "gvt.pyx":73 * _createMesh(name.encode()) * * def addMeshVertices(str name, int size, np.ndarray[float, ndim=1, mode="c"] vertices not None): # <<<<<<<<<<<<<< * _addMeshVertices(name.encode(),size, vertices.data) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_5addMeshVertices, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_7addMeshVertices, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshVertices, __pyx_t_1) < 0) __PYX_ERR(0, 69, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshVertices, __pyx_t_1) < 0) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":72 + /* "gvt.pyx":76 * _addMeshVertices(name.encode(),size, vertices.data) * * def addMeshTriangles(str name, unsigned n, np.ndarray[unsigned, ndim=1, mode="c"] triangles): # <<<<<<<<<<<<<< * _addMeshTriangles(name.encode(), n, triangles.data) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_7addMeshTriangles, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_9addMeshTriangles, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshTriangles, __pyx_t_1) < 0) __PYX_ERR(0, 72, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshTriangles, __pyx_t_1) < 0) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":75 + /* "gvt.pyx":79 * _addMeshTriangles(name.encode(), n, triangles.data) * * def addMeshFaceNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): # <<<<<<<<<<<<<< * _addMeshFaceNormals(name.encode(), n, normals.data) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_9addMeshFaceNormals, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_11addMeshFaceNormals, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshFaceNormals, __pyx_t_1) < 0) __PYX_ERR(0, 75, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshFaceNormals, __pyx_t_1) < 0) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":78 + /* "gvt.pyx":82 * _addMeshFaceNormals(name.encode(), n, normals.data) * * def addMeshVertexNormals( str name, unsigned n, np.ndarray[float, ndim=1, mode="c"] normals): # <<<<<<<<<<<<<< * _addMeshVertexNormals(name.encode(),n, normals.data) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_11addMeshVertexNormals, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_13addMeshVertexNormals, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshVertexNormals, __pyx_t_1) < 0) __PYX_ERR(0, 78, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshVertexNormals, __pyx_t_1) < 0) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":81 + /* "gvt.pyx":85 * _addMeshVertexNormals(name.encode(),n, normals.data) * * def finishMesh( str name, bool compute_normal = True): # <<<<<<<<<<<<<< * _finishMesh(name.encode(),compute_normal) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_13finishMesh, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_15finishMesh, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_finishMesh, __pyx_t_1) < 0) __PYX_ERR(0, 81, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_finishMesh, __pyx_t_1) < 0) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":84 + /* "gvt.pyx":88 * _finishMesh(name.encode(),compute_normal) * * def addMeshMaterialLambert( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, float alpha): # <<<<<<<<<<<<<< * _addMeshMaterial(name.encode() ,mattype, kd.data, alpha) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_15addMeshMaterialLambert, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_17addMeshMaterialLambert, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshMaterialLambert, __pyx_t_1) < 0) __PYX_ERR(0, 84, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshMaterialLambert, __pyx_t_1) < 0) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":87 + /* "gvt.pyx":91 * _addMeshMaterial(name.encode() ,mattype, kd.data, alpha) * * def addMeshMaterialSpecular( str name, unsigned mattype, np.ndarray[float, ndim=1, mode="c"] kd, np.ndarray[float, ndim=1, mode="c"] ks, float alpha ): # <<<<<<<<<<<<<< * _addMeshMaterial2(name.encode(), mattype, kd.data, ks.data, alpha) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_17addMeshMaterialSpecular, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_19addMeshMaterialSpecular, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshMaterialSpecular, __pyx_t_1) < 0) __PYX_ERR(0, 87, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addMeshMaterialSpecular, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":93 + /* "gvt.pyx":97 * # _addMeshMaterials(name.encode(),n, mattype.data, kd.data, ks.float, alpha.data) * * def addInstance(str name, np.ndarray[float, ndim=1, mode="c"] m): # <<<<<<<<<<<<<< * _addInstance(name.encode(), m.data) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_19addInstance, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_21addInstance, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addInstance, __pyx_t_1) < 0) __PYX_ERR(0, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addInstance, __pyx_t_1) < 0) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":96 + /* "gvt.pyx":100 * _addInstance(name.encode(), m.data) * * def addPointLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): # <<<<<<<<<<<<<< * _addPointLight(name.encode(), pos.data, color.data) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_21addPointLight, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_23addPointLight, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addPointLight, __pyx_t_1) < 0) __PYX_ERR(0, 96, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addPointLight, __pyx_t_1) < 0) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":99 + /* "gvt.pyx":103 * _addPointLight(name.encode(), pos.data, color.data) * * def addAreaLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): # <<<<<<<<<<<<<< * _addAreaLight(name.encode(), pos.data, color.data, n.data, w, h) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_23addAreaLight, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_25addAreaLight, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addAreaLight, __pyx_t_1) < 0) __PYX_ERR(0, 99, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addAreaLight, __pyx_t_1) < 0) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":102 + /* "gvt.pyx":106 * _addAreaLight(name.encode(), pos.data, color.data, n.data, w, h) * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color): # <<<<<<<<<<<<<< * _modifyLight(name.encode(),pos.data, color.data) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_25modifyLight, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_27modifyLight, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_modifyLight, __pyx_t_1) < 0) __PYX_ERR(0, 102, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_modifyLight, __pyx_t_1) < 0) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":105 + /* "gvt.pyx":109 * _modifyLight(name.encode(),pos.data, color.data) * * def modifyLight(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] color, np.ndarray[float, ndim=1, mode="c"] n, float w, float h): # <<<<<<<<<<<<<< * _modifyLight(name.encode(),pos.data,color.data,n.data,w,h) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_27modifyLight, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_29modifyLight, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_modifyLight, __pyx_t_1) < 0) __PYX_ERR(0, 105, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_modifyLight, __pyx_t_1) < 0) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":108 + /* "gvt.pyx":112 * _modifyLight(name.encode(),pos.data,color.data,n.data,w,h) * * def addCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov, int depth, int samples, float jitter): # <<<<<<<<<<<<<< * _addCamera(name.encode(), pos.data, focus.data,up.data,fov,depth,samples,jitter) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_29addCamera, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_31addCamera, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addCamera, __pyx_t_1) < 0) __PYX_ERR(0, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addCamera, __pyx_t_1) < 0) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":111 + /* "gvt.pyx":115 * _addCamera(name.encode(), pos.data, focus.data,up.data,fov,depth,samples,jitter) * * def modifyCamera(str name, np.ndarray[float, ndim=1, mode="c"] pos, np.ndarray[float, ndim=1, mode="c"] focus, np.ndarray[float, ndim=1, mode="c"] up, float fov): # <<<<<<<<<<<<<< * _modifyCamera(name.encode(), pos.data, focus.data,up.data,fov) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_31modifyCamera, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_33modifyCamera, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_modifyCamera, __pyx_t_1) < 0) __PYX_ERR(0, 111, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_modifyCamera, __pyx_t_1) < 0) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":114 + /* "gvt.pyx":118 * _modifyCamera(name.encode(), pos.data, focus.data,up.data,fov) * * def addFilm(str name, int w, int h, str path): # <<<<<<<<<<<<<< * _addFilm(name.encode(),w,h,path.encode()) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_33addFilm, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_35addFilm, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addFilm, __pyx_t_1) < 0) __PYX_ERR(0, 114, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addFilm, __pyx_t_1) < 0) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":117 + /* "gvt.pyx":121 * _addFilm(name.encode(),w,h,path.encode()) * * def modifyFilm(str name, int w, int h, str path): # <<<<<<<<<<<<<< * _modifyFilm(name.encode(),w,h,path.encode()) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_35modifyFilm, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_37modifyFilm, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_modifyFilm, __pyx_t_1) < 0) __PYX_ERR(0, 117, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_modifyFilm, __pyx_t_1) < 0) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":120 + /* "gvt.pyx":124 * _modifyFilm(name.encode(),w,h,path.encode()) * * def addRenderer(str name, int adapter, int schedule): # <<<<<<<<<<<<<< * _addRenderer(name.encode(),adapter,schedule) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_37addRenderer, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_39addRenderer, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_addRenderer, __pyx_t_1) < 0) __PYX_ERR(0, 120, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_addRenderer, __pyx_t_1) < 0) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":123 + /* "gvt.pyx":127 * _addRenderer(name.encode(),adapter,schedule) * * def render(str name): # <<<<<<<<<<<<<< * _render(name.encode()) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_39render, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_41render, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_render, __pyx_t_1) < 0) __PYX_ERR(0, 123, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_render, __pyx_t_1) < 0) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gvt.pyx":126 + /* "gvt.pyx":130 * _render(name.encode()) * * def writeimage(str name, str output): # <<<<<<<<<<<<<< * _writeimage(name.encode(),output.encode()) */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_41writeimage, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3gvt_43writeimage, NULL, __pyx_n_s_gvt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_writeimage, __pyx_t_1) < 0) __PYX_ERR(0, 126, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_writeimage, __pyx_t_1) < 0) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "gvt.pyx":1 @@ -8539,7 +8922,7 @@ PyMODINIT_FUNC PyInit_gvt(void) * @cname("__pyx_convert_string_from_py_std__in_string") * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: # <<<<<<<<<<<<<< * cdef Py_ssize_t length - * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) */ /*--- Wrapped vars code ---*/ @@ -8549,7 +8932,7 @@ PyMODINIT_FUNC PyInit_gvt(void) __Pyx_XDECREF(__pyx_t_1); if (__pyx_m) { if (__pyx_d) { - __Pyx_AddTraceback("init gvt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("init gvt", 0, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { @@ -8582,278 +8965,8 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { } #endif -/* ArgTypeTest */ -static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { - PyErr_Format(PyExc_TypeError, - "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", - name, type->tp_name, Py_TYPE(obj)->tp_name); -} -static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, - const char *name, int exact) -{ - if (unlikely(!type)) { - PyErr_SetString(PyExc_SystemError, "Missing type object"); - return 0; - } - if (none_allowed && obj == Py_None) return 1; - else if (exact) { - if (likely(Py_TYPE(obj) == type)) return 1; - #if PY_MAJOR_VERSION == 2 - else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; - #endif - } - else { - if (likely(PyObject_TypeCheck(obj, type))) return 1; - } - __Pyx_RaiseArgumentTypeInvalid(name, obj, type); - return 0; -} - -/* PyCFunctionFastCall */ -#if CYTHON_FAST_PYCCALL -static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { - PyCFunctionObject *func = (PyCFunctionObject*)func_obj; - PyCFunction meth = PyCFunction_GET_FUNCTION(func); - PyObject *self = PyCFunction_GET_SELF(func); - assert(PyCFunction_Check(func)); - assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST))); - assert(nargs >= 0); - assert(nargs == 0 || args != NULL); - /* _PyCFunction_FastCallDict() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the - caller loses its exception */ - assert(!PyErr_Occurred()); - return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL); -} -#endif // CYTHON_FAST_PYCCALL - -/* PyFunctionFastCall */ -#if CYTHON_FAST_PYCALL -#include "frameobject.h" -static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, - PyObject *globals) { - PyFrameObject *f; - PyThreadState *tstate = PyThreadState_GET(); - PyObject **fastlocals; - Py_ssize_t i; - PyObject *result; - assert(globals != NULL); - /* XXX Perhaps we should create a specialized - PyFrame_New() that doesn't take locals, but does - take builtins without sanity checking them. - */ - assert(tstate != NULL); - f = PyFrame_New(tstate, co, globals, NULL); - if (f == NULL) { - return NULL; - } - fastlocals = f->f_localsplus; - for (i = 0; i < na; i++) { - Py_INCREF(*args); - fastlocals[i] = *args++; - } - result = PyEval_EvalFrameEx(f,0); - ++tstate->recursion_depth; - Py_DECREF(f); - --tstate->recursion_depth; - return result; -} -#if 1 || PY_VERSION_HEX < 0x030600B1 -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) { - PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); - PyObject *globals = PyFunction_GET_GLOBALS(func); - PyObject *argdefs = PyFunction_GET_DEFAULTS(func); - PyObject *closure; -#if PY_MAJOR_VERSION >= 3 - PyObject *kwdefs; -#endif - PyObject *kwtuple, **k; - PyObject **d; - Py_ssize_t nd; - Py_ssize_t nk; - PyObject *result; - assert(kwargs == NULL || PyDict_Check(kwargs)); - nk = kwargs ? PyDict_Size(kwargs) : 0; - if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { - return NULL; - } - if ( -#if PY_MAJOR_VERSION >= 3 - co->co_kwonlyargcount == 0 && -#endif - likely(kwargs == NULL || nk == 0) && - co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { - if (argdefs == NULL && co->co_argcount == nargs) { - result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); - goto done; - } - else if (nargs == 0 && argdefs != NULL - && co->co_argcount == Py_SIZE(argdefs)) { - /* function called with no arguments, but all parameters have - a default value: use default values as arguments .*/ - args = &PyTuple_GET_ITEM(argdefs, 0); - result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); - goto done; - } - } - if (kwargs != NULL) { - Py_ssize_t pos, i; - kwtuple = PyTuple_New(2 * nk); - if (kwtuple == NULL) { - result = NULL; - goto done; - } - k = &PyTuple_GET_ITEM(kwtuple, 0); - pos = i = 0; - while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { - Py_INCREF(k[i]); - Py_INCREF(k[i+1]); - i += 2; - } - nk = i / 2; - } - else { - kwtuple = NULL; - k = NULL; - } - closure = PyFunction_GET_CLOSURE(func); -#if PY_MAJOR_VERSION >= 3 - kwdefs = PyFunction_GET_KW_DEFAULTS(func); -#endif - if (argdefs != NULL) { - d = &PyTuple_GET_ITEM(argdefs, 0); - nd = Py_SIZE(argdefs); - } - else { - d = NULL; - nd = 0; - } -#if PY_MAJOR_VERSION >= 3 - result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, - args, nargs, - k, (int)nk, - d, (int)nd, kwdefs, closure); -#else - result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, - args, nargs, - k, (int)nk, - d, (int)nd, closure); -#endif - Py_XDECREF(kwtuple); -done: - Py_LeaveRecursiveCall(); - return result; -} -#endif // CPython < 3.6 -#endif // CYTHON_FAST_PYCALL - -/* PyObjectCall */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; - ternaryfunc call = func->ob_type->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; - result = (*call)(func, arg, kw); - Py_LeaveRecursiveCall(); - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); - } - return result; -} -#endif - -/* PyObjectCallMethO */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { - PyObject *self, *result; - PyCFunction cfunc; - cfunc = PyCFunction_GET_FUNCTION(func); - self = PyCFunction_GET_SELF(func); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; - result = cfunc(self, arg); - Py_LeaveRecursiveCall(); - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); - } - return result; -} -#endif - -/* PyObjectCallOneArg */ -#if CYTHON_COMPILING_IN_CPYTHON -static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { - PyObject *result; - PyObject *args = PyTuple_New(1); - if (unlikely(!args)) return NULL; - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 0, arg); - result = __Pyx_PyObject_Call(func, args, NULL); - Py_DECREF(args); - return result; -} -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -#if CYTHON_FAST_PYCALL - if (PyFunction_Check(func)) { - return __Pyx_PyFunction_FastCall(func, &arg, 1); - } -#endif -#ifdef __Pyx_CyFunction_USED - if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { -#else - if (likely(PyCFunction_Check(func))) { -#endif - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); -#if CYTHON_FAST_PYCCALL - } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); -#endif - } - } - return __Pyx__PyObject_CallOneArg(func, arg); -} -#else -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { - PyObject *result; - PyObject *args = PyTuple_Pack(1, arg); - if (unlikely(!args)) return NULL; - result = __Pyx_PyObject_Call(func, args, NULL); - Py_DECREF(args); - return result; -} -#endif - -/* PyObjectCallNoArg */ - #if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { -#if CYTHON_FAST_PYCALL - if (PyFunction_Check(func)) { - return __Pyx_PyFunction_FastCall(func, NULL, 0); - } -#endif -#ifdef __Pyx_CyFunction_USED - if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { -#else - if (likely(PyCFunction_Check(func))) { -#endif - if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { - return __Pyx_PyObject_CallMethO(func, NULL); - } - } - return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); -} -#endif - /* RaiseArgTupleInvalid */ - static void __Pyx_RaiseArgtupleInvalid( +static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, @@ -8879,7 +8992,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } /* RaiseDoubleKeywords */ - static void __Pyx_RaiseDoubleKeywordsError( +static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { @@ -8893,7 +9006,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } /* ParseKeywords */ - static int __Pyx_ParseOptionalKeywords( +static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, @@ -8994,8 +9107,35 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { return -1; } +/* ArgTypeTest */ +static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); +} +static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, + const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (none_allowed && obj == Py_None) return 1; + else if (exact) { + if (likely(Py_TYPE(obj) == type)) return 1; + #if PY_MAJOR_VERSION == 2 + else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(PyObject_TypeCheck(obj, type))) return 1; + } + __Pyx_RaiseArgumentTypeInvalid(name, obj, type); + return 0; +} + /* BufferFormatCheck */ - static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { +static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } @@ -9544,8 +9684,252 @@ static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { __Pyx_ReleaseBuffer(info); } +/* PyCFunctionFastCall */ + #if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs); + } +} +#endif + +/* PyFunctionFastCall */ + #if CYTHON_FAST_PYCALL +#include "frameobject.h" +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = PyThreadState_GET(); + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = f->f_localsplus; + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyObjectCall */ + #if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ + #if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallOneArg */ + #if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + +/* PyObjectCallNoArg */ + #if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { +#else + if (likely(PyCFunction_Check(func))) { +#endif + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + /* PyErrFetchRestore */ - #if CYTHON_FAST_THREAD_STATE + #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; @@ -9569,7 +9953,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject #endif /* GetBuiltinName */ - static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, @@ -9583,7 +9967,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject } /* RaiseException */ - #if PY_MAJOR_VERSION < 3 + #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { __Pyx_PyThreadState_declare @@ -9746,25 +10130,25 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject #endif /* RaiseTooManyValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* RaiseNoneIterError */ - static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* ExtTypeTest */ - static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; @@ -9777,7 +10161,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject } /* SaveResetException */ - #if CYTHON_FAST_THREAD_STATE + #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->exc_type; *value = tstate->exc_value; @@ -9801,7 +10185,7 @@ static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject #endif /* PyErrExceptionMatches */ - #if CYTHON_FAST_THREAD_STATE + #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) { PyObject *exc_type = tstate->curexc_type; if (exc_type == err) return 1; @@ -9811,7 +10195,7 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta #endif /* GetException */ - #if CYTHON_FAST_THREAD_STATE + #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { @@ -9872,7 +10256,7 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) } /* Import */ - static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; @@ -9945,8 +10329,42 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) return module; } +/* CLineInTraceback */ + static int __Pyx_CLineForTraceback(int c_line) { +#ifdef CYTHON_CLINE_IN_TRACEBACK + return ((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0; +#else + PyObject **cython_runtime_dict; + PyObject *use_cline; + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (unlikely(!cython_runtime_dict)) { + PyObject *ptype, *pvalue, *ptraceback; + PyObject *use_cline_obj; + PyErr_Fetch(&ptype, &pvalue, &ptraceback); + use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + use_cline = NULL; + } + PyErr_Restore(ptype, pvalue, ptraceback); + } else { + use_cline = PyDict_GetItem(*_PyObject_GetDictPtr(__pyx_cython_runtime), __pyx_n_s_cline_in_traceback); + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (PyObject_Not(use_cline) != 0) { + c_line = 0; + } + return c_line; +#endif +} + /* CodeObjectCache */ - static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; @@ -10026,7 +10444,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { } /* AddTraceback */ - #include "compile.h" + #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( @@ -10085,12 +10503,15 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; - py_code = __pyx_find_code_object(c_line ? c_line : py_line); + if (c_line) { + c_line = __Pyx_CLineForTraceback(c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; - __pyx_insert_code_object(c_line ? c_line : py_line, py_code); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ @@ -10127,8 +10548,8 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { #endif - /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + /* CIntFromPyVerify */ + #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) @@ -10150,7 +10571,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { } /* Declarations */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); @@ -10170,7 +10591,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { #endif /* Arithmetic */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); @@ -10305,7 +10726,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { #endif /* Declarations */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); @@ -10325,7 +10746,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { #endif /* Arithmetic */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); @@ -10460,7 +10881,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { #endif /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { @@ -10491,7 +10912,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { @@ -10522,7 +10943,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { } /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 @@ -10711,7 +11132,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { } /* CIntFromPy */ - static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { + static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 @@ -10900,7 +11321,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { @@ -10931,7 +11352,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { } /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 @@ -11120,7 +11541,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { } /* CheckBinaryVersion */ - static int __Pyx_check_binary_version(void) { + static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); @@ -11136,7 +11557,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { } /* ModuleImport */ - #ifndef __PYX_HAVE_RT_ImportModule + #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; @@ -11154,7 +11575,7 @@ static PyObject *__Pyx_ImportModule(const char *name) { #endif /* TypeImport */ - #ifndef __PYX_HAVE_RT_ImportType + #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) @@ -11219,7 +11640,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class #endif /* InitStrings */ - static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { + static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { @@ -11244,6 +11665,8 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class #endif if (!*t->p) return -1; + if (PyObject_Hash(*t->p) == -1) + PyErr_Clear(); ++t; } return 0; @@ -11252,11 +11675,11 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } -static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } -static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII diff --git a/pygvt/src/gvt/gvt.pyx b/pygvt/src/gvt/gvt.pyx index c1bea7b2..234d1e1e 100644 --- a/pygvt/src/gvt/gvt.pyx +++ b/pygvt/src/gvt/gvt.pyx @@ -13,6 +13,7 @@ from libcpp cimport bool cdef extern from "api.h": void _gvtInit"gvtInit"(int argc, char** argv) + void _readPly"readPly"(string dirname, bool dist, float* world_bounds) void _createMesh"createMesh"(string) void _addMeshVertices"addMeshVertices"(string name, unsigned &n, float *vertices) void _addMeshTriangles"addMeshTriangles"( string name, unsigned &n, unsigned *triangles) @@ -63,6 +64,9 @@ def gvtInit(): # argv[i] = ctypes.create_string_buffer(enc_arg) # _gvtInit(argc,argv) +def readPly(str dirname, bool dist, np.ndarray[float, ndim=1, mode="c"] world_bounds): + _readPly(dirname.encode(), dist, world_bounds.data) + def createMesh(str name): _createMesh(name.encode()) diff --git a/pygvt/test_example_plyapp.sh b/pygvt/test_example_plyapp.sh new file mode 100644 index 00000000..4126d6f8 --- /dev/null +++ b/pygvt/test_example_plyapp.sh @@ -0,0 +1,16 @@ +#!/bin/bash -x + +if [ -z $GVT_DATA ] +then + GVT_DATA=$PWD/../data +fi + +python example_plyapp.py --light-color 30 30 30 ${GVT_DATA}/wavelet_color +python example_plyapp.py --light-color 500 500 500 ${GVT_DATA}/EnzoPlyData + +if [ -z ${GVT_MODELS} ]; then + echo "GVT_MODELS is unset. Please specify the model directory." +else + python example_plyapp.py --light-color 900 900 900 ${GVT_MODELS}/enzocolor +fi + diff --git a/src/gvt/render/api/api.cpp b/src/gvt/render/api/api.cpp index 10cf64c2..d4508229 100644 --- a/src/gvt/render/api/api.cpp +++ b/src/gvt/render/api/api.cpp @@ -26,6 +26,7 @@ ACI-1339881 and ACI-1339840 #include #include #include +#include #include @@ -87,6 +88,66 @@ void gvtInit(int argc, char **argv) { cntxt->syncContext(); } +void readPly(const std::string dirname, bool dist, float *world_bounds) { + gvt::render::RenderContext *cntxt = gvt::render::RenderContext::instance(); + + gvt::core::DBNodeH root = cntxt->getRootNode(); + // root += cntxt->createNode( + // "threads", cmd.isSet("threads") ? (int)cmd.get("threads") : (int)std::thread::hardware_concurrency()); + + if (MPI::COMM_WORLD.Get_rank() == 0) { + cntxt->addToSync(cntxt->createNodeFromType("Data", "Data", root.UUID())); + cntxt->addToSync(cntxt->createNodeFromType("Instances", "Instances", root.UUID())); + } + + cntxt->syncContext(); + + gvt::core::DBNodeH dataNodes = root["Data"]; + gvt::core::DBNodeH instNodes = root["Instances"]; + + gvt::render::data::domain::reader::PlyReader plyReader(dirname, dist); + + if (MPI::COMM_WORLD.Get_rank() == 0) { + Box3D bounds; + + for (int k = 0; k < plyReader.getMeshes().size(); k++) { + + // add instance + gvt::core::DBNodeH instnode = cntxt->createNodeFromType("Instance", "inst", instNodes.UUID()); + gvt::core::DBNodeH meshNode = dataNodes.getChildren()[k]; + Box3D *mbox = (Box3D *)meshNode["bbox"].value().toULongLong(); + instnode["id"] = k; + instnode["meshRef"] = meshNode.UUID(); + auto m = new glm::mat4(1.f); + auto minv = new glm::mat4(1.f); + auto normi = new glm::mat3(1.f); + instnode["mat"] = (unsigned long long)m; + *minv = glm::inverse(*m); + instnode["matInv"] = (unsigned long long)minv; + *normi = glm::transpose(glm::inverse(glm::mat3(*m))); + instnode["normi"] = (unsigned long long)normi; + auto il = glm::vec3((*m) * glm::vec4(mbox->bounds_min, 1.f)); + auto ih = glm::vec3((*m) * glm::vec4(mbox->bounds_max, 1.f)); + Box3D *ibox = new gvt::render::data::primitives::Box3D(il, ih); + instnode["bbox"] = (unsigned long long)ibox; + instnode["centroid"] = ibox->centroid(); + + bounds.merge(*ibox); + + cntxt->addToSync(instnode); + } + + world_bounds[0] = bounds.bounds_min[0]; + world_bounds[1] = bounds.bounds_min[1]; + world_bounds[2] = bounds.bounds_min[2]; + world_bounds[3] = bounds.bounds_max[0]; + world_bounds[4] = bounds.bounds_max[1]; + world_bounds[5] = bounds.bounds_max[2]; + } + + cntxt->syncContext(); +} + void createMesh(const std::string name) { gvt::render::RenderContext *cntxt = gvt::render::RenderContext::instance(); diff --git a/src/gvt/render/api/api.h b/src/gvt/render/api/api.h index b2f5b452..c56eee09 100644 --- a/src/gvt/render/api/api.h +++ b/src/gvt/render/api/api.h @@ -50,6 +50,14 @@ void gvtInit(int argc, char **argv); // void addMesh(gvt::render::data::primitives::Box3D *mshbx, gvt::render::data::primitives::Mesh *mesh, // std::string meshname); +/* Reads ply files in a directory. + * \param[in] dirname Name of directory containing ply files. + * \param[in] dist True if multiple nodes are used. + * \param[out] world_bounds Min/Max coordinates for world bounds. bounds_min(x,y,z) and bounds_max(x,y,z). + */ +void readPly(const std::string dirname, bool dist, float *world_bounds); + + /* Creates a mesh with a unique name * \param Mesh unique name */ diff --git a/third-party/ply.h b/third-party/ply.h deleted file mode 100644 index 6b537e3a..00000000 --- a/third-party/ply.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * - * Header for PLY polygon files. - * - * - Greg Turk, March 1994 - * - * A PLY file contains a single polygonal _object_. - * - * An object is composed of lists of _elements_. Typical elements are - * vertices, faces, edges and materials. - * - * Each type of element for a given object has one or more _properties_ - * associated with the element type. For instance, a vertex element may - * have as properties three floating-point values x,y,z and three unsigned - * chars for red, green and blue. - * - * --------------------------------------------------------------- - * - * Copyright (c) 1994 The Board of Trustees of The Leland Stanford - * Junior University. All rights reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation for any purpose is hereby granted without fee, provided - * that the above copyright notice and this permission notice appear in - * all copies of this software and that you do not sell the software. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * */ - -#ifndef __PLY_H__ -#define __PLY_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#define PLY_ASCII 1 /* ascii PLY file */ -#define PLY_BINARY_BE 2 /* binary PLY file, big endian */ -#define PLY_BINARY_LE 3 /* binary PLY file, little endian */ - -#define PLY_OKAY 0 /* ply routine worked okay */ -#define PLY_ERROR -1 /* error in ply routine */ - - /* scalar data types supported by PLY format */ - -#define PLY_START_TYPE 0 -#define PLY_CHAR 1 -#define PLY_SHORT 2 -#define PLY_INT 3 -#define PLY_UCHAR 4 -#define PLY_USHORT 5 -#define PLY_UINT 6 -#define PLY_FLOAT 7 -#define PLY_DOUBLE 8 -#define PLY_END_TYPE 9 - -#define PLY_SCALAR 0 -#define PLY_LIST 1 - - - typedef struct PlyProperty { /* description of a property */ - - char *name; /* property name */ - int external_type; /* file's data type */ - int internal_type; /* program's data type */ - int offset; /* offset bytes of prop in a struct */ - - int is_list; /* 1 = list, 0 = scalar */ - int count_external; /* file's count type */ - int count_internal; /* program's count type */ - int count_offset; /* offset byte for list count */ - - } PlyProperty; - - typedef struct PlyElement { /* description of an element */ - char *name; /* element name */ - int num; /* number of elements in this object */ - int size; /* size of element (bytes) or -1 if variable */ - int nprops; /* number of properties for this element */ - PlyProperty **props; /* list of properties in the file */ - char *store_prop; /* flags: property wanted by user? */ - int other_offset; /* offset to un-asked-for props, or -1 if none*/ - int other_size; /* size of other_props structure */ - } PlyElement; - - typedef struct PlyOtherProp { /* describes other properties in an element */ - char *name; /* element name */ - int size; /* size of other_props */ - int nprops; /* number of properties in other_props */ - PlyProperty **props; /* list of properties in other_props */ - } PlyOtherProp; - - typedef struct OtherData { /* for storing other_props for an other element */ - void *other_props; - } OtherData; - - typedef struct OtherElem { /* data for one "other" element */ - char *elem_name; /* names of other elements */ - int elem_count; /* count of instances of each element */ - OtherData **other_data; /* actual property data for the elements */ - PlyOtherProp *other_props; /* description of the property data */ - } OtherElem; - - typedef struct PlyOtherElems { /* "other" elements, not interpreted by user */ - int num_elems; /* number of other elements */ - OtherElem *other_list; /* list of data for other elements */ - } PlyOtherElems; - - typedef struct PlyFile { /* description of PLY file */ - FILE *fp; /* file pointer */ - int file_type; /* ascii or binary */ - float version; /* version number of file */ - int nelems; /* number of elements of object */ - PlyElement **elems; /* list of elements */ - int num_comments; /* number of comments */ - char **comments; /* list of comments */ - int num_obj_info; /* number of items of object information */ - char **obj_info; /* list of object info items */ - PlyElement *which_elem; /* which element we're currently writing */ - PlyOtherElems *other_elems; /* "other" elements from a PLY file */ - } PlyFile; - - /* memory allocation */ - extern char *my_alloc(); -#define myalloc(mem_size) my_alloc((mem_size), __LINE__, __FILE__) - - - /*** delcaration of routines ***/ - - extern PlyFile *ply_write(FILE *, int, char **, int); - extern PlyFile *ply_open_for_writing(char *, int, char **, int, float *); - extern void ply_describe_element(PlyFile *, char *, int, int, PlyProperty *); - extern void ply_describe_property(PlyFile *, char *, PlyProperty *); - extern void ply_element_count(PlyFile *, char *, int); - extern void ply_header_complete(PlyFile *); - extern void ply_put_element_setup(PlyFile *, char *); - extern void ply_put_element(PlyFile *, void *); - extern void ply_put_comment(PlyFile *, char *); - extern void ply_put_obj_info(PlyFile *, char *); - extern PlyFile *ply_read(FILE *, int *, char ***); - extern PlyFile *ply_open_for_reading( char *, int *, char ***, int *, float *); - extern PlyProperty **ply_get_element_description(PlyFile *, char *, int*, int*); - extern void ply_get_element_setup( PlyFile *, char *, int, PlyProperty *); - extern void ply_get_property(PlyFile *, char *, PlyProperty *); - extern PlyOtherProp *ply_get_other_properties(PlyFile *, char *, int); - extern ply_get_element(PlyFile *, void *); - extern char **ply_get_comments(PlyFile *, int *); - extern char **ply_get_obj_info(PlyFile *, int *); - extern void ply_close(PlyFile *); - extern void ply_get_info(PlyFile *, float *, int *); - extern PlyOtherElems *ply_get_other_element (PlyFile *, char *, int); - extern void ply_describe_other_elements ( PlyFile *, PlyOtherElems *); - extern void ply_put_other_elements (PlyFile *); - extern void ply_free_other_elements (PlyOtherElems *); - - extern int equal_strings(char *, char *); - - -#ifdef __cplusplus -} -#endif -#endif /* !__PLY_H__ */ -